[PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot

From: Shi, FengX
Date: Wed May 31 2017 - 22:52:42 EST



On some emulator system, 50us is not enough to reboot the system
when write reboot_code to cf9. System will halt there by int3.
Here extend the delay time from 50us to 50ms.
Such extension will improve the robustness of reboot,
without impact to the time of system reboot, which is already triggered by outb.

Signed-off-by: Shi Feng <fengx.shi@xxxxxxxxx>
Reviewed-by: Li Fei <fei.li@xxxxxxxxx>
---
arch/x86/kernel/reboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 2544700..66a991d 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -630,7 +630,7 @@ static void native_machine_emergency_restart(void)
udelay(50);
/* Actually do the reset */
outb(cf9|reboot_code, 0xcf9);
- udelay(50);
+ mdelay(50);
}
reboot_type = BOOT_TRIPLE;
break;
--
1.9.1