aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/reboot.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 563ed91e6faa..ca42f6350b23 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -511,10 +511,13 @@ static void native_machine_emergency_restart(void)
511 511
512 case BOOT_CF9_COND: 512 case BOOT_CF9_COND:
513 if (port_cf9_safe) { 513 if (port_cf9_safe) {
514 u8 cf9 = inb(0xcf9) & ~6; 514 u8 reboot_code = reboot_mode == REBOOT_WARM ?
515 0x06 : 0x0E;
516 u8 cf9 = inb(0xcf9) & ~reboot_code;
515 outb(cf9|2, 0xcf9); /* Request hard reset */ 517 outb(cf9|2, 0xcf9); /* Request hard reset */
516 udelay(50); 518 udelay(50);
517 outb(cf9|6, 0xcf9); /* Actually do the reset */ 519 /* Actually do the reset */
520 outb(cf9|reboot_code, 0xcf9);
518 udelay(50); 521 udelay(50);
519 } 522 }
520 reboot_type = BOOT_KBD; 523 reboot_type = BOOT_KBD;