mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: x86@kernel.org, shrybman@teksavvy.com, dparsons@brightdsl.net,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Len Brown <len.brown@intel.com>
Subject: [PATCH 2/2] x86 smpboot: fix CPU #1 boot timeout
Date: Fri, 16 Oct 2015 00:14:29 -0400	[thread overview]
Message-ID: <6dd554ee8945984d85aafb2ad35793174d068af0.1444968087.git.len.brown@intel.com> (raw)
In-Reply-To: <1444968869-21435-1-git-send-email-lenb@kernel.org>
In-Reply-To: <de363cdbbcfcca1d22569683f7eb9873e0177251.1444968087.git.len.brown@intel.com>

From: Len Brown <len.brown@intel.com>

Commit a9bcaa02a5104ace6a9d9e4a9cd9192a9e7744d6
("x86/smpboot: Remove SIPI delays from cpu_up()")

Caused some Intel Core2 processors to time-out when bringing up CPU #1.

That patch reduced the SIPI delays from udelay() 300, 200
to udelay() 0, 0 on modern processors.

Several Intel(R) Core(TM)2 systems
failed to bring up CPU #1 10/10 times after that change.

Increasing either of the SIPI delays to udelay(1) results in success.
So here we increase both to udelay(10).  While this may be 20x slower
than the absolute minimum, it is still 20x to 30x faster
than the original code.

Signed-off-by: Len Brown <len.brown@intel.com>
---
 arch/x86/kernel/smpboot.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 32267cc..892ee2e5 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -660,7 +660,9 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
 		/*
 		 * Give the other CPU some time to accept the IPI.
 		 */
-		if (init_udelay)
+		if (init_udelay == 0)
+			udelay(10);
+		else
 			udelay(300);
 
 		pr_debug("Startup point 1\n");
@@ -671,7 +673,9 @@ wakeup_secondary_cpu_via_init(int phys_apicid, unsigned long start_eip)
 		/*
 		 * Give the other CPU some time to accept the IPI.
 		 */
-		if (init_udelay)
+		if (init_udelay == 0)
+			udelay(10);
+		else
 			udelay(200);
 
 		if (maxlvt > 3)		/* Due to the Pentium erratum 3AP.  */
-- 
2.6.1.145.gb27dacc


  reply	other threads:[~2015-10-16  4:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16  4:14 [PATCH/RFT 0/2] regression fix: "smpboot: do_boot_cpu failed(-1) to wakeup CPU#1" Len Brown
2015-10-16  4:14 ` [PATCH 1/2] x86 smpboot: fix cpu_init_udelay=10000 Len Brown
2015-10-16  4:14   ` Len Brown [this message]
2015-10-19 17:48     ` [tip:x86/urgent] x86/smpboot: Fix CPU #1 boot timeout tip-bot for Len Brown
2015-10-16 19:34   ` [PATCH 1/2] x86 smpboot: fix cpu_init_udelay=10000 shrybman
2015-11-03  5:16     ` Len Brown
2015-11-06  2:39       ` shrybman
2015-10-19 17:47   ` [tip:x86/urgent] x86/smpboot: Fix cpu_init_udelay= 10000 corner case boot parameter misbehavior tip-bot for Len Brown
2015-10-16  5:42 ` [PATCH/RFT 0/2] regression fix: "smpboot: do_boot_cpu failed(-1) to wakeup CPU#1" Donald Parsons
2015-10-16  6:12 ` shrybman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6dd554ee8945984d85aafb2ad35793174d068af0.1444968087.git.len.brown@intel.com \
    --to=lenb@kernel.org \
    --cc=dparsons@brightdsl.net \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=shrybman@teksavvy.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®