[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] linux: Fix IRQ disable/enable logic across save/restore.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1176227360 -3600
# Node ID 4dc14c591e6cf5177974f244db9ae4f609521417
# Parent  e8caf7802f3feede444dcf33a4cc1629dd359249
linux: Fix IRQ disable/enable logic across save/restore.
stop_machine_run() executes our callback function with interrupts
disabled.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -r e8caf7802f3f -r 4dc14c591e6c 
linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c
--- a/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c    Tue Apr 10 
17:29:16 2007 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/core/machine_reboot.c    Tue Apr 10 
18:49:20 2007 +0100
@@ -127,8 +127,10 @@ static int take_machine_down(void *p_fas
        extern void time_resume(void);
 
        if (fast_suspend) {
-               preempt_disable();
-       } else {
+               BUG_ON(!irqs_disabled());
+       } else {
+               BUG_ON(irqs_disabled());
+
                for (;;) {
                        err = smp_suspend();
                        if (err)
@@ -143,11 +145,11 @@ static int take_machine_down(void *p_fas
                        preempt_enable();
                        xenbus_suspend_cancel();
                }
+
+               local_irq_disable();
        }
 
        mm_pin_all();
-       local_irq_disable();
-       preempt_enable();
        gnttab_suspend();
        pre_suspend();
 
@@ -178,7 +180,9 @@ static int take_machine_down(void *p_fas
 #endif
        }
        time_resume();
-       local_irq_enable();
+
+       if (!fast_suspend)
+               local_irq_enable();
 
        return suspend_cancelled;
 }

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.