]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] i386: Implement machine_emergency_reboot
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 26 Jul 2005 17:41:26 +0000 (11:41 -0600)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 26 Jul 2005 21:35:42 +0000 (14:35 -0700)
set_cpus_allowed is not safe in interrupt context
and disabling apics is complicated code so don't
call machine_shutdown on i386 from emergency_restart().

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

index 1b24bc7271af165730ae48e7c8c91783fd040d23..d473350aa05506297ff36583a6028743e1be0b81 100644 (file)
@@ -311,10 +311,8 @@ void machine_shutdown(void)
 #endif
 }
 
 #endif
 }
 
-void machine_restart(char * __unused)
+void machine_emergency_restart(void)
 {
 {
-       machine_shutdown();
-
        if (!reboot_thru_bios) {
                if (efi_enabled) {
                        efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
        if (!reboot_thru_bios) {
                if (efi_enabled) {
                        efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
@@ -337,6 +335,12 @@ void machine_restart(char * __unused)
        machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
 }
 
        machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
 }
 
+void machine_restart(char * __unused)
+{
+       machine_shutdown();
+       machine_emergency_restart();
+}
+
 void machine_halt(void)
 {
 }
 void machine_halt(void)
 {
 }
index 108d8c48e42e86978077354f2fa1b151f25c41df..680c3956334542d75617e6d89b82298f906e250a 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef _ASM_EMERGENCY_RESTART_H
 #define _ASM_EMERGENCY_RESTART_H
 
 #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 */
 
 #endif /* _ASM_EMERGENCY_RESTART_H */