aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-06-10 09:50:35 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-06-10 09:50:35 +0100
commitd6906bfcad16821cf0228fc648324de7795eac0f (patch)
tree6281fe53e7db65f202dc88dd099d6083bd3f4c7b
parentbc9428767c717bba9eabd06a2620712a9b9689c2 (diff)
downloadxen-d6906bfcad16821cf0228fc648324de7795eac0f.tar.gz
xen-d6906bfcad16821cf0228fc648324de7795eac0f.tar.bz2
xen-d6906bfcad16821cf0228fc648324de7795eac0f.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> xen-unstable changeset: 21550:cb75117829a6 xen-unstable date: Mon Jun 07 16:41:19 2010 +0100
-rw-r--r--xen/arch/x86/shutdown.c7
-rw-r--r--xen/arch/x86/tboot.c5
2 files changed, 7 insertions, 5 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);
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c
index 9cbed0b09f..9e0205b738 100644
--- a/xen/arch/x86/tboot.c
+++ b/xen/arch/x86/tboot.c
@@ -334,11 +334,6 @@ void tboot_shutdown(uint32_t shutdown_type)
local_irq_disable();
- /* we may be called from an interrupt context, so to prevent */
- /* 'ASSERT(!in_irq());' in alloc_domheap_pages(), decrease count */
- while ( in_irq() )
- irq_exit();
-
/* Create identity map for tboot shutdown code. */
/* do before S3 integrity because mapping tboot may change xenheap */
map_base = PFN_DOWN(g_tboot_shared->tboot_base);