Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654769

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

From "Shi, FengX" <fengx.shi@intel.com>
Newsgroups linux.kernel
Subject [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot
Date 2017-06-01 05:00 +0200
Message-ID <tNov8-59b-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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@intel.com>
Reviewed-by: Li Fei <fei.li@intel.com>
---
 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot "Shi, FengX" <fengx.shi@intel.com> - 2017-06-01 05:00 +0200
  Re: [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-06-01 15:10 +0200

csiph-web