From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Anoob Soman <anoob.soman@citrix.com>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: jgross@suse.com
Subject: Re: [PATCH V2] xen-evtchn: Bind dyn evtchn:qemu-dm interrupt to next online VCPU
Date: Tue, 6 Jun 2017 15:41:34 -0400 [thread overview]
Message-ID: <91bfac47-7258-cec0-2a61-29f2b2e5454b@oracle.com> (raw)
In-Reply-To: <1496746648-25300-1-git-send-email-anoob.soman@citrix.com>
>
> /* 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
next prev parent reply other threads:[~2017-06-06 19:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 10:57 Anoob Soman
2017-06-06 19:41 ` Boris Ostrovsky [this message]
2017-06-07 10:31 ` Anoob Soman
2017-06-06 20:02 ` kbuild test robot
2017-06-06 20:58 ` Boris Ostrovsky
2017-06-07 10:34 ` Anoob Soman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91bfac47-7258-cec0-2a61-29f2b2e5454b@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=anoob.soman@citrix.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®