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

[Xen-changelog] [xen-unstable] x86: Force !in_irq() in machine_restart().



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275925279 -3600
# Node ID cb75117829a6a107c6da73b3f6fc3c42d65bf5af
# Parent  8bcaec29574ebf7ac8b79c7f5b5d6711a3c80740
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@xxxxxxxxxx>
---
 xen/arch/x86/shutdown.c |    7 +++++++
 xen/arch/x86/tboot.c    |    5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff -r 8bcaec29574e -r cb75117829a6 xen/arch/x86/shutdown.c
--- a/xen/arch/x86/shutdown.c   Mon Jun 07 15:49:46 2010 +0100
+++ b/xen/arch/x86/shutdown.c   Mon Jun 07 16:41:19 2010 +0100
@@ -316,6 +316,13 @@ void machine_restart(unsigned int delay_
             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 -r 8bcaec29574e -r cb75117829a6 xen/arch/x86/tboot.c
--- a/xen/arch/x86/tboot.c      Mon Jun 07 15:49:46 2010 +0100
+++ b/xen/arch/x86/tboot.c      Mon Jun 07 16:41:19 2010 +0100
@@ -333,11 +333,6 @@ void tboot_shutdown(uint32_t shutdown_ty
     g_tboot_shared->shutdown_type = 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 */

_______________________________________________
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®.