aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/reboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/i386/kernel/reboot.c')
-rw-r--r--arch/i386/kernel/reboot.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
index b3e584849961..c71fef31dc47 100644
--- a/arch/i386/kernel/reboot.c
+++ b/arch/i386/kernel/reboot.c
@@ -284,7 +284,7 @@ void machine_shutdown(void)
284 reboot_cpu_id = 0; 284 reboot_cpu_id = 0;
285 285
286 /* See if there has been given a command line override */ 286 /* See if there has been given a command line override */
287 if ((reboot_cpu_id != -1) && (reboot_cpu < NR_CPUS) && 287 if ((reboot_cpu != -1) && (reboot_cpu < NR_CPUS) &&
288 cpu_isset(reboot_cpu, cpu_online_map)) { 288 cpu_isset(reboot_cpu, cpu_online_map)) {
289 reboot_cpu_id = reboot_cpu; 289 reboot_cpu_id = reboot_cpu;
290 } 290 }
@@ -311,10 +311,8 @@ void machine_shutdown(void)
311#endif 311#endif
312} 312}
313 313
314void machine_restart(char * __unused) 314void machine_emergency_restart(void)
315{ 315{
316 machine_shutdown();
317
318 if (!reboot_thru_bios) { 316 if (!reboot_thru_bios) {
319 if (efi_enabled) { 317 if (efi_enabled) {
320 efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); 318 efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL);
@@ -337,23 +335,22 @@ void machine_restart(char * __unused)
337 machine_real_restart(jump_to_bios, sizeof(jump_to_bios)); 335 machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
338} 336}
339 337
340EXPORT_SYMBOL(machine_restart); 338void machine_restart(char * __unused)
339{
340 machine_shutdown();
341 machine_emergency_restart();
342}
341 343
342void machine_halt(void) 344void machine_halt(void)
343{ 345{
344} 346}
345 347
346EXPORT_SYMBOL(machine_halt);
347
348void machine_power_off(void) 348void machine_power_off(void)
349{ 349{
350 lapic_shutdown(); 350 machine_shutdown();
351 351
352 if (efi_enabled)
353 efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, NULL);
354 if (pm_power_off) 352 if (pm_power_off)
355 pm_power_off(); 353 pm_power_off();
356} 354}
357 355
358EXPORT_SYMBOL(machine_power_off);
359 356