[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 6 Jun 2017 15:41:34 -0400
From: Boris Ostrovsky <boris.ostrovsky@...cle.com>
To: Anoob Soman <anoob.soman@...rix.com>,
xen-devel@...ts.xenproject.org, linux-kernel@...r.kernel.org
Cc: jgross@...e.com
Subject: Re: [PATCH V2] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next
online VCPU
>
> /* 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
Powered by blists - more mailing lists