aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/shutdown.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-07 16:41:19 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-07 16:41:19 +0100
commit7aa4b1bbc79df5e1063d88b803312295fa88f361 (patch)
tree3766046d3b5824c3ee10b17cb3446f1faf97562b /xen/arch/x86/shutdown.c
parent702890192a4c1f05aabb24332bec2721fb75399e (diff)
downloadxen-7aa4b1bbc79df5e1063d88b803312295fa88f361.tar.gz
xen-7aa4b1bbc79df5e1063d88b803312295fa88f361.tar.bz2
xen-7aa4b1bbc79df5e1063d88b803312295fa88f361.zip
x86: Force !in_irq() in machine_restart().
Various function we may call assert this fact. We just want to restart the system. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/arch/x86/shutdown.c')
-rw-r--r--xen/arch/x86/shutdown.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
index 15f5988af7..6466df4ee8 100644
--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -316,6 +316,13 @@ void machine_restart(unsigned int delay_millisecs)
halt();
}
+ /*
+ * We may be called from an interrupt context, and various functions we
+ * may need to call (alloc_domheap_pages, map_domain_page, ...) assert that
+ * they are not called from interrupt context. This hack keeps them happy.
+ */
+ local_irq_count(0) = 0;
+
smp_send_stop();
mdelay(delay_millisecs);