All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot
@ 2017-06-01  2:52 Shi, FengX
  2017-06-01 12:59 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Shi, FengX @ 2017-06-01  2:52 UTC (permalink / raw)
  To: tglx, mingo, hpa, x86
  Cc: matjaz.hegedic, keescook, Li, Fei, xlpang, Gortmaker,
	Paul (Wind River),
	alex.hung, linux-kernel


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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot
  2017-06-01  2:52 [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot Shi, FengX
@ 2017-06-01 12:59 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2017-06-01 12:59 UTC (permalink / raw)
  To: Shi, FengX
  Cc: tglx, mingo, hpa, x86, matjaz.hegedic, keescook, Li, Fei, xlpang,
	Gortmaker, Paul (Wind River),
	alex.hung, linux-kernel

On Thu, 1 Jun 2017 02:52:32 +0000
"Shi, FengX" <fengx.shi@intel.com> wrote:

> On some emulator system, 50us is not enough to reboot the system
> when write reboot_code to cf9. System will halt there by int3.

Then your emulator is not emulating 8) and you really need to get whoever
is responsible to fix it. If it's some kind of Intel internal emulator
then I don't see why a hack for it belongs upstream either.

You can also use existing boot options to force an EFI, ACPI or BIOS
reboot with a standard kernel so you can deal with your emulator in your
emulator firmware just fine.

> 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.

On a system where a PCI reboot fails you add 50ms before the triple fault
kicks in, so that statement is not true.

Alan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-06-01 13:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01  2:52 [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot Shi, FengX
2017-06-01 12:59 ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.