From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751202AbdFACwj convert rfc822-to-8bit (ORCPT ); Wed, 31 May 2017 22:52:39 -0400 Received: from mga05.intel.com ([192.55.52.43]:15138 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751080AbdFACwi (ORCPT ); Wed, 31 May 2017 22:52:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,277,1493708400"; d="scan'208";a="109457439" From: "Shi, FengX" To: "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" CC: "matjaz.hegedic@gmail.com" , "keescook@chromium.org" , "Li, Fei" , "xlpang@redhat.com" , "Gortmaker, Paul (Wind River)" , "alex.hung@canonical.com" , "linux-kernel@vger.kernel.org" Subject: [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot Thread-Topic: [PATCH] reboot: extend delay from 50us to 50ms for CF9 reboot Thread-Index: AdLafFT0UgYRVxDpQ4KIEyUg3b+0kQ== Date: Thu, 1 Jun 2017 02:52:32 +0000 Message-ID: <5111FC7902668B47AB76E3967882E2F26AD54985@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Li Fei --- 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