From: Stefano Stabellini Subject: [PATCH 1/2] xen: allow on_selected_cpus with interrupts disabled Date: Fri, 3 May 2013 15:58:38 +0100 Message-ID: <1367593119-4398-1-git-send-email-stefano.stabellini@eu.citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xensource.com Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Allow on_selected_cpus with interrupts disabled, use it with care. Signed-off-by: Stefano Stabellini --- 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) -- 1.7.2.5