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: Fix xen panic when offlining a CPU.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Fix xen panic when offlining a CPU.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 18 Feb 2009 07:15:15 -0800
Delivery-date: Wed, 18 Feb 2009 07:15:06 -0800
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 1234947566 0
# Node ID b29a64d04a01647f70f2c921dbec0b6a3124b2bb
# Parent  c3a307f5a14b2b10e8e34afcc1cf42fe3f2f2737
x86: Fix xen panic when offlining a CPU.

Also, fix a typo in a message. 'irq' => 'vector'

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 xen/arch/x86/irq.c |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff -r c3a307f5a14b -r b29a64d04a01 xen/arch/x86/irq.c
--- a/xen/arch/x86/irq.c        Wed Feb 18 08:57:56 2009 +0000
+++ b/xen/arch/x86/irq.c        Wed Feb 18 08:59:26 2009 +0000
@@ -1142,6 +1142,8 @@ void fixup_irqs(cpumask_t map)
     static int warned;
     irq_guest_action_t *action;
     struct pending_eoi *peoi;
+    irq_desc_t         *desc;
+    unsigned long       flags;
 
     /* Direct all future interrupts away from this CPU. */
     for ( vector = 0; vector < NR_VECTORS; vector++ )
@@ -1150,18 +1152,24 @@ void fixup_irqs(cpumask_t map)
         if ( vector_to_irq(vector) == 2 )
             continue;
 
-        cpus_and(mask, irq_desc[vector].affinity, map);
+        desc = &irq_desc[vector];
+
+        spin_lock_irqsave(&desc->lock, flags);
+
+        cpus_and(mask, desc->affinity, map);
         if ( any_online_cpu(mask) == NR_CPUS )
         {
             printk("Breaking affinity for vector %u (irq %i)\n",
                    vector, vector_to_irq(vector));
             mask = map;
         }
-        if ( irq_desc[vector].handler->set_affinity )
-            irq_desc[vector].handler->set_affinity(vector, mask);
-        else if ( irq_desc[vector].action && !(warned++) )
-            printk("Cannot set affinity for irq %u (irq %i)\n",
+        if ( desc->handler->set_affinity )
+            desc->handler->set_affinity(vector, mask);
+        else if ( desc->action && !(warned++) )
+            printk("Cannot set affinity for vector %u (irq %i)\n",
                    vector, vector_to_irq(vector));
+
+        spin_unlock_irqrestore(&desc->lock, flags);
     }
 
     /* Service any interrupts that beat us in the re-direction race. */

_______________________________________________
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: Fix xen panic when offlining a CPU., Xen patchbot-unstable <=