diff options
-rw-r--r-- | arch/x86_64/kernel/reboot.c | 18 | ||||
-rw-r--r-- | include/asm-x86_64/emergency-restart.h | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/arch/x86_64/kernel/reboot.c b/arch/x86_64/kernel/reboot.c index d4c45ff92d5c..3d1cc09406a6 100644 --- a/arch/x86_64/kernel/reboot.c +++ b/arch/x86_64/kernel/reboot.c | |||
@@ -109,16 +109,10 @@ void machine_shutdown(void) | |||
109 | local_irq_enable(); | 109 | local_irq_enable(); |
110 | } | 110 | } |
111 | 111 | ||
112 | void machine_restart(char * __unused) | 112 | void machine_emergency_restart(void) |
113 | { | 113 | { |
114 | int i; | 114 | int i; |
115 | 115 | ||
116 | printk("machine restart\n"); | ||
117 | |||
118 | if (!reboot_force) { | ||
119 | machine_shutdown(); | ||
120 | } | ||
121 | |||
122 | /* Tell the BIOS if we want cold or warm reboot */ | 116 | /* Tell the BIOS if we want cold or warm reboot */ |
123 | *((unsigned short *)__va(0x472)) = reboot_mode; | 117 | *((unsigned short *)__va(0x472)) = reboot_mode; |
124 | 118 | ||
@@ -143,6 +137,16 @@ void machine_restart(char * __unused) | |||
143 | } | 137 | } |
144 | } | 138 | } |
145 | 139 | ||
140 | void machine_restart(char * __unused) | ||
141 | { | ||
142 | printk("machine restart\n"); | ||
143 | |||
144 | if (!reboot_force) { | ||
145 | machine_shutdown(); | ||
146 | } | ||
147 | machine_emergency_restart(); | ||
148 | } | ||
149 | |||
146 | void machine_halt(void) | 150 | void machine_halt(void) |
147 | { | 151 | { |
148 | } | 152 | } |
diff --git a/include/asm-x86_64/emergency-restart.h b/include/asm-x86_64/emergency-restart.h index 108d8c48e42e..680c39563345 100644 --- a/include/asm-x86_64/emergency-restart.h +++ b/include/asm-x86_64/emergency-restart.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _ASM_EMERGENCY_RESTART_H | 1 | #ifndef _ASM_EMERGENCY_RESTART_H |
2 | #define _ASM_EMERGENCY_RESTART_H | 2 | #define _ASM_EMERGENCY_RESTART_H |
3 | 3 | ||
4 | #include <asm-generic/emergency-restart.h> | 4 | extern void machine_emergency_restart(void); |
5 | 5 | ||
6 | #endif /* _ASM_EMERGENCY_RESTART_H */ | 6 | #endif /* _ASM_EMERGENCY_RESTART_H */ |