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-unstable] Delay 5 seconds on reboot *after* stoppin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Delay 5 seconds on reboot *after* stopping all CPUs.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 04 Aug 2008 15:10:10 -0700
Delivery-date: Mon, 04 Aug 2008 15:10:05 -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 1217843962 -3600
# Node ID 0c857419d354804ec4cf1548c4fd06bc4e26047e
# Parent  f69a23b209c4ab04827051734e37f095607400ed
Delay 5 seconds on reboot *after* stopping all CPUs.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/ia64/xen/domain.c |    5 +++--
 xen/arch/x86/shutdown.c    |   11 ++++++++---
 xen/common/keyhandler.c    |    2 +-
 xen/common/shutdown.c      |    5 ++---
 xen/drivers/char/console.c |    3 +--
 xen/include/xen/shutdown.h |    2 +-
 6 files changed, 16 insertions(+), 12 deletions(-)

diff -r f69a23b209c4 -r 0c857419d354 xen/arch/ia64/xen/domain.c
--- a/xen/arch/ia64/xen/domain.c        Fri Aug 01 15:38:07 2008 +0100
+++ b/xen/arch/ia64/xen/domain.c        Mon Aug 04 10:59:22 2008 +0100
@@ -2212,8 +2212,9 @@ int __init construct_dom0(struct domain 
        return 0;
 }
 
-void machine_restart(void)
-{
+void machine_restart(unsigned int delay_millisecs)
+{
+       mdelay(delay_millisecs);
        console_start_sync();
        if (running_on_sim)
                printk ("machine_restart called.  spinning...\n");
diff -r f69a23b209c4 -r 0c857419d354 xen/arch/x86/shutdown.c
--- a/xen/arch/x86/shutdown.c   Fri Aug 01 15:38:07 2008 +0100
+++ b/xen/arch/x86/shutdown.c   Mon Aug 04 10:59:22 2008 +0100
@@ -291,7 +291,12 @@ __initcall(reboot_init);
 
 #endif
 
-void machine_restart(void)
+static void __machine_restart(void *pdelay)
+{
+    machine_restart(*(unsigned int *)pdelay);
+}
+
+void machine_restart(unsigned int delay_millisecs)
 {
     int i;
 
@@ -304,8 +309,8 @@ void machine_restart(void)
     if ( get_apic_id() != boot_cpu_physical_apicid )
     {
         /* Send IPI to the boot CPU (logical cpu 0). */
-        on_selected_cpus(cpumask_of_cpu(0), (void *)machine_restart,
-                         NULL, 1, 0);
+        on_selected_cpus(cpumask_of_cpu(0), __machine_restart,
+                         &delay_millisecs, 1, 0);
         for ( ; ; )
             halt();
     }
diff -r f69a23b209c4 -r 0c857419d354 xen/common/keyhandler.c
--- a/xen/common/keyhandler.c   Fri Aug 01 15:38:07 2008 +0100
+++ b/xen/common/keyhandler.c   Mon Aug 04 10:59:22 2008 +0100
@@ -143,7 +143,7 @@ static void halt_machine(unsigned char k
 static void halt_machine(unsigned char key, struct cpu_user_regs *regs)
 {
     printk("'%c' pressed -> rebooting machine\n", key);
-    machine_restart();
+    machine_restart(0);
 }
 
 static void cpuset_print(char *set, int size, cpumask_t mask)
diff -r f69a23b209c4 -r 0c857419d354 xen/common/shutdown.c
--- a/xen/common/shutdown.c     Fri Aug 01 15:38:07 2008 +0100
+++ b/xen/common/shutdown.c     Mon Aug 04 10:59:22 2008 +0100
@@ -23,8 +23,7 @@ static void maybe_reboot(void)
     {
         printk("rebooting machine in 5 seconds.\n");
         watchdog_disable();
-        mdelay(5000);
-        machine_restart();
+        machine_restart(5000);
     }
 }
 
@@ -50,7 +49,7 @@ void dom0_shutdown(u8 reason)
     case SHUTDOWN_reboot:
     {
         printk("Domain 0 shutdown: rebooting machine.\n");
-        machine_restart();
+        machine_restart(0);
         break; /* not reached */
     }
 
diff -r f69a23b209c4 -r 0c857419d354 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Fri Aug 01 15:38:07 2008 +0100
+++ b/xen/drivers/char/console.c        Mon Aug 04 10:59:22 2008 +0100
@@ -939,8 +939,7 @@ void panic(const char *fmt, ...)
     else
     {
         watchdog_disable();
-        mdelay(5000);
-        machine_restart();
+        machine_restart(5000);
     }
 }
 
diff -r f69a23b209c4 -r 0c857419d354 xen/include/xen/shutdown.h
--- a/xen/include/xen/shutdown.h        Fri Aug 01 15:38:07 2008 +0100
+++ b/xen/include/xen/shutdown.h        Mon Aug 04 10:59:22 2008 +0100
@@ -6,7 +6,7 @@ extern int opt_noreboot;
 
 void dom0_shutdown(u8 reason);
 
-void machine_restart(void);
+void machine_restart(unsigned int delay_millisecs);
 void machine_halt(void);
 void machine_power_off(void);
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Delay 5 seconds on reboot *after* stopping all CPUs., Xen patchbot-unstable <=