From: Keir Fraser <keir.xen@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
xen-devel@lists.xensource.com
Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com
Subject: Re: [PATCH 1/2] xen: allow on_selected_cpus with interrupts disabled
Date: Fri, 03 May 2013 16:53:22 +0100 [thread overview]
Message-ID: <CDA99C02.23FE7%keir.xen@gmail.com> (raw)
In-Reply-To: <1367593119-4398-1-git-send-email-stefano.stabellini@eu.citrix.com>
On 03/05/2013 15:58, "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>
wrote:
> Allow on_selected_cpus with interrupts disabled, use it with care.
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
NACK. The potential for deadlock is obvious, unclear what 'with care' might
entail.
-- Keir
> ---
> xen/common/smp.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/xen/common/smp.c b/xen/common/smp.c
> index dcd93ad..7deb97c 100644
> --- a/xen/common/smp.c
> +++ b/xen/common/smp.c
> @@ -33,10 +33,9 @@ void on_selected_cpus(
> int wait)
> {
> unsigned int nr_cpus;
> + unsigned long flags;
>
> - ASSERT(local_irq_is_enabled());
> -
> - spin_lock(&call_lock);
> + spin_lock_irqsave(&call_lock, flags);
>
> cpumask_copy(&call_data.selected, selected);
>
> @@ -54,7 +53,7 @@ void on_selected_cpus(
> cpu_relax();
>
> out:
> - spin_unlock(&call_lock);
> + spin_unlock_irqrestore(&call_lock, flags);
> }
>
> void smp_call_function_interrupt(void)
next prev parent reply other threads:[~2013-05-03 15:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 14:58 [PATCH 0/2] xen: EOI on the correct GICC interface Stefano Stabellini
2013-05-03 14:58 ` [PATCH 1/2] xen: allow on_selected_cpus with interrupts disabled Stefano Stabellini
2013-05-03 15:21 ` Ian Campbell
2013-05-03 15:57 ` Keir Fraser
2013-05-03 16:01 ` Ian Campbell
2013-05-03 16:04 ` Ian Campbell
2013-05-03 17:38 ` Keir Fraser
2013-05-03 16:40 ` Stefano Stabellini
2013-05-03 15:53 ` Keir Fraser [this message]
2013-05-03 14:58 ` [PATCH 2/2] xen/gic: EOI irqs on the right pcpu Stefano Stabellini
2013-05-03 15:13 ` Julien Grall
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=CDA99C02.23FE7%keir.xen@gmail.com \
--to=keir.xen@gmail.com \
--cc=Ian.Campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.