mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Len Brown <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: peterz@infradead.org, torvalds@linux-foundation.org,
	tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com,
	len.brown@intel.com, mingo@kernel.org
Subject: [tip:x86/urgent] x86/smpboot: Fix cpu_init_udelay= 10000 corner case boot parameter misbehavior
Date: Mon, 19 Oct 2015 10:47:53 -0700	[thread overview]
Message-ID: <tip-f1ccd249319efca4ee4faf1d904f5a362cac7c81@git.kernel.org> (raw)
In-Reply-To: <de363cdbbcfcca1d22569683f7eb9873e0177251.1444968087.git.len.brown@intel.com>

Commit-ID:  f1ccd249319efca4ee4faf1d904f5a362cac7c81
Gitweb:     http://git.kernel.org/tip/f1ccd249319efca4ee4faf1d904f5a362cac7c81
Author:     Len Brown <len.brown@intel.com>
AuthorDate: Fri, 16 Oct 2015 00:14:28 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Mon, 19 Oct 2015 09:14:41 +0200

x86/smpboot: Fix cpu_init_udelay=10000 corner case boot parameter misbehavior

For legacy machines cpu_init_udelay defaults to 10,000.
For modern machines it is set to 0.

The user should be able to set cpu_init_udelay to
any value on the cmdline, including 10,000.

Before this patch, that was seen as "unchanged from default"
and thus on a modern machine, the user request was ignored
and the delay was set to 0.

Signed-off-by: Len Brown <len.brown@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: dparsons@brightdsl.net
Cc: shrybman@teksavvy.com
Link: http://lkml.kernel.org/r/de363cdbbcfcca1d22569683f7eb9873e0177251.1444968087.git.len.brown@intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/smpboot.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index e0c198e..32267cc 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -509,7 +509,7 @@ void __inquire_remote_apic(int apicid)
  */
 #define UDELAY_10MS_DEFAULT 10000
 
-static unsigned int init_udelay = UDELAY_10MS_DEFAULT;
+static unsigned int init_udelay = INT_MAX;
 
 static int __init cpu_init_udelay(char *str)
 {
@@ -522,13 +522,16 @@ early_param("cpu_init_udelay", cpu_init_udelay);
 static void __init smp_quirk_init_udelay(void)
 {
 	/* if cmdline changed it from default, leave it alone */
-	if (init_udelay != UDELAY_10MS_DEFAULT)
+	if (init_udelay != INT_MAX)
 		return;
 
 	/* if modern processor, use no delay */
 	if (((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) && (boot_cpu_data.x86 == 6)) ||
 	    ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && (boot_cpu_data.x86 >= 0xF)))
 		init_udelay = 0;
+
+	/* else, use legacy delay */
+	init_udelay = UDELAY_10MS_DEFAULT;
 }
 
 /*

  parent reply	other threads:[~2015-10-19 17:48 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   ` [PATCH 2/2] x86 smpboot: fix CPU #1 boot timeout Len Brown
2015-10-19 17:48     ` [tip:x86/urgent] x86/smpboot: Fix " 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-bot for Len Brown [this message]
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=tip-f1ccd249319efca4ee4faf1d904f5a362cac7c81@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=hpa@zytor.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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

Powered by JetHome