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-4.0-testing] x86: Force !in_irq() in machine_restar

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] x86: Force !in_irq() in machine_restart().
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 10 Jun 2010 02:25:43 -0700
Delivery-date: Thu, 10 Jun 2010 02:28:35 -0700
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 1276159835 -3600
# Node ID 2e83288657d3d7d08749298e2c46e7c4b74fe1e1
# Parent  d6470041aa2ed155a8dd6a724b693fd88da56535
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-unstable changeset:   21550:cb75117829a6
xen-unstable date:        Mon Jun 07 16:41:19 2010 +0100
---
 xen/arch/x86/shutdown.c |    7 +++++++
 xen/arch/x86/tboot.c    |    5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff -r d6470041aa2e -r 2e83288657d3 xen/arch/x86/shutdown.c
--- a/xen/arch/x86/shutdown.c   Thu Jun 10 09:50:02 2010 +0100
+++ b/xen/arch/x86/shutdown.c   Thu Jun 10 09:50:35 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 d6470041aa2e -r 2e83288657d3 xen/arch/x86/tboot.c
--- a/xen/arch/x86/tboot.c      Thu Jun 10 09:50:02 2010 +0100
+++ b/xen/arch/x86/tboot.c      Thu Jun 10 09:50:35 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.0-testing] x86: Force !in_irq() in machine_restart()., Xen patchbot-4.0-testing <=