[PATCH] x86_64: Implemenent machine_emergency_restart
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 26 Jul 2005 17:45:31 +0000 (11:45 -0600)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Jul 2005 21:35:42 +0000 (14:35 -0700)
It is not safe to call set_cpus_allowed() in interrupt
context and disabling the apics is complicated code.
So unconditionally skip machine_shutdown in machine_emergency_reboot
on x86_64.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/reboot.c
include/asm-x86_64/emergency-restart.h

index d4c45ff92d5c6688aad158f78013ab0df9f944e3..3d1cc09406a6c9583312a388f55e07d902fb43d8 100644 (file)
@@ -109,16 +109,10 @@ void machine_shutdown(void)
        local_irq_enable();
 }
 
-void machine_restart(char * __unused)
+void machine_emergency_restart(void)
 {
        int i;
 
-       printk("machine restart\n");
-
-       if (!reboot_force) {
-               machine_shutdown();
-       }
-       
        /* Tell the BIOS if we want cold or warm reboot */
        *((unsigned short *)__va(0x472)) = reboot_mode;
        
@@ -143,6 +137,16 @@ void machine_restart(char * __unused)
        }      
 }
 
+void machine_restart(char * __unused)
+{
+       printk("machine restart\n");
+
+       if (!reboot_force) {
+               machine_shutdown();
+       }
+       machine_emergency_restart();
+}
+
 void machine_halt(void)
 {
 }
index 108d8c48e42e86978077354f2fa1b151f25c41df..680c3956334542d75617e6d89b82298f906e250a 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef _ASM_EMERGENCY_RESTART_H
 #define _ASM_EMERGENCY_RESTART_H
 
-#include <asm-generic/emergency-restart.h>
+extern void machine_emergency_restart(void);
 
 #endif /* _ASM_EMERGENCY_RESTART_H */