WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: Ensure irq is disabled before taking

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Ensure irq is disabled before taking vector_lock.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Aug 2009 09:20:32 -0700
Delivery-date: Fri, 21 Aug 2009 09:21:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1250871275 -3600
# Node ID 9189afa1f1e6939fcda5525e225843cfd2325c42
# Parent  6e83b0ec2d70dca1538216d967dc5448a580191c
x86: Ensure irq is disabled before taking vector_lock.

Fixed debug lock issue for taking vector lock.

Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
---
 xen/arch/x86/io_apic.c |    9 ++++++---
 xen/arch/x86/irq.c     |    1 +
 2 files changed, 7 insertions(+), 3 deletions(-)

diff -r 6e83b0ec2d70 -r 9189afa1f1e6 xen/arch/x86/io_apic.c
--- a/xen/arch/x86/io_apic.c    Fri Aug 21 17:13:54 2009 +0100
+++ b/xen/arch/x86/io_apic.c    Fri Aug 21 17:14:35 2009 +0100
@@ -379,6 +379,7 @@ unsigned int set_desc_affinity(struct ir
     struct irq_cfg *cfg;
     unsigned int irq;
     int ret;
+    unsigned long flags;
     cpumask_t dest_mask;
 
     if (!cpus_intersects(mask, cpu_online_map))
@@ -386,11 +387,13 @@ unsigned int set_desc_affinity(struct ir
 
     irq = desc->irq;
     cfg = desc->chip_data;
-    
-    lock_vector_lock();   
+
+    local_irq_save(flags);
+    lock_vector_lock();
     ret = __assign_irq_vector(irq, cfg, mask);
     unlock_vector_lock();
-    
+    local_irq_restore(flags);
+
     if (ret < 0)
         return BAD_APICID;
 
diff -r 6e83b0ec2d70 -r 9189afa1f1e6 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Fri Aug 21 17:13:54 2009 +0100
+++ b/xen/arch/x86/irq.c        Fri Aug 21 17:14:35 2009 +0100
@@ -55,6 +55,7 @@ DEFINE_PER_CPU(vector_irq_t, vector_irq)
 
 DEFINE_PER_CPU(struct cpu_user_regs *, __irq_regs);
 
+/* Must be called when irq disabled */
 void lock_vector_lock(void)
 {
     /* Used to the online set of cpus does not change

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Ensure irq is disabled before taking vector_lock., Xen patchbot-unstable <=