Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1659157
| From | Boris Ostrovsky <boris.ostrovsky@oracle.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V2] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU |
| Date | 2017-06-06 21:50 +0200 |
| Message-ID | <tPsEj-4Hz-23@gated-at.bofh.it> (permalink) |
| References | <tPknp-7Bq-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
>
> /* Rebind an evtchn so that it gets delivered to a specific cpu */
> -static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
> +int xen_rebind_evtchn_to_cpu(int evtchn, unsigned tcpu)
> {
> struct evtchn_bind_vcpu bind_vcpu;
> - int evtchn = evtchn_from_irq(irq);
> int masked;
>
> if (!VALID_EVTCHN(evtchn))
> @@ -1338,6 +1337,12 @@ static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
>
> return 0;
> }
> +EXPORT_SYMBOL_GPL(xen_rebind_evtchn_to_cpu);
> +
> +static int rebind_irq_to_cpu(unsigned irq, unsigned tcpu)
> +{
> + return xen_rebind_evtchn_to_cpu(evtchn_from_irq(irq), tcpu);
> +}
There is a single call site for rebind_irq_to_cpu() so why not call
xen_rebind_evtchn_to_cpu() directly?
>
> +static void evtchn_bind_interdom_next_vcpu(int evtchn)
> +{
> + static DEFINE_PER_CPU(int, bind_last_selected_cpu);
> + unsigned int selected_cpu, irq;
> + struct irq_desc *desc;
> + unsigned long flags;
> +
> + irq = irq_from_evtchn(evtchn);
> + desc = irq_to_desc(irq);
> +
> + if (!desc)
> + return;
> +
> + raw_spin_lock_irqsave(&desc->lock, flags);
Is there a reason why you are using raw_ version?
(Sorry, I should have noticed both of these earlier)
-boris
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V2] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU Anoob Soman <anoob.soman@citrix.com> - 2017-06-06 13:00 +0200
Re: [PATCH V2] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-06-06 21:50 +0200
Re: [PATCH V2] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU Anoob Soman <anoob.soman@citrix.com> - 2017-06-07 12:40 +0200
csiph-web