All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Yinghai Lu <yhlu.kernel@gmail.com>
Cc: Jeff Chua <jeff.chua.linux@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Miller <davem@davemloft.net>,
	Max Krasnyansky <maxk@qualcomm.com>,
	Li Zefan <lizf@cn.fujitsu.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.27rc1 cannot boot more than 8CPUs
Date: Mon, 11 Aug 2008 22:44:04 +0200	[thread overview]
Message-ID: <20080811204404.GD10774@elte.hu> (raw)
In-Reply-To: <86802c440808111336o1dbffbb0xf551b4feb54b231c@mail.gmail.com>


* Yinghai Lu <yhlu.kernel@gmail.com> wrote:

> [PATCH] x86: move def_to_bigsmp check later
> 
> and skip the apicid id > 8

applied to tip/x86/urgent - thanks Yinghai. While we are touching this 
code i cleaned up the printk a bit: the line breaking was way too ugly, 
and the message not very informative about the effects of this problem. 
See the full commit below.

	Ingo

--------------->
>From b74548e76a0eab1f29546e7c5a589429c069a680 Mon Sep 17 00:00:00 2001
From: Yinghai Lu <yhlu.kernel@gmail.com>
Date: Mon, 11 Aug 2008 13:36:04 -0700
Subject: [PATCH] x86: fix 2.6.27rc1 cannot boot more than 8CPUs

Jeff Chua reported that booting a !bigsmp kernel on a 16-way box
hangs silently.

this is a long-standing issue, smp start AP cpu could check the
apic id >=8 etc before trying to start it.

achieve this by moving the def_to_bigsmp check later and skip the
apicid id > 8

[ mingo@elte.hu: clean up the message that is printed. ]

Reported-by: "Jeff Chua" <jeff.chua.linux@gmail.com>
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

 arch/x86/kernel/setup.c   |    6 ------
 arch/x86/kernel/smpboot.c |   10 ++++++++++
 2 files changed, 10 insertions(+), 6 deletions(-)
---
 arch/x86/kernel/setup.c   |    6 ------
 arch/x86/kernel/smpboot.c |   10 ++++++++++
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 6e5823b..68b48e3 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -861,12 +861,6 @@ void __init setup_arch(char **cmdline_p)
 	init_apic_mappings();
 	ioapic_init_mappings();
 
-#if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32)
-	if (def_to_bigsmp)
-		printk(KERN_WARNING "More than 8 CPUs detected and "
-			"CONFIG_X86_PC cannot handle it.\nUse "
-			"CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n");
-#endif
 	kvm_guest_init();
 
 	e820_reserve_resources();
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index da10f07..91055d7 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -994,7 +994,17 @@ int __cpuinit native_cpu_up(unsigned int cpu)
 	flush_tlb_all();
 	low_mappings = 1;
 
+#ifdef CONFIG_X86_PC
+	if (def_to_bigsmp && apicid > 8) {
+		printk(KERN_WARNING
+			"More than 8 CPUs detected - skipping them.\n"
+			"Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n");
+		err = -1;
+	} else
+		err = do_boot_cpu(apicid, cpu);
+#else
 	err = do_boot_cpu(apicid, cpu);
+#endif
 
 	zap_low_mappings();
 	low_mappings = 0;

  reply	other threads:[~2008-08-11 20:44 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06  3:15 2.6.27rc1 cannot boot more than 8CPUs Jeff Chua
2008-08-06  3:31 ` Max Krasnyansky
2008-08-06  3:50   ` Jeff Chua
2008-08-06  3:54     ` Max Krasnyansky
2008-08-06  4:06       ` Jeff Chua
2008-08-06  4:48         ` Max Krasnyansky
2008-08-06  4:53           ` Li Zefan
2008-08-06 20:11             ` Max Krasnyansky
     [not found] ` <86802c440808052050u489264beo30812523669ef4df@mail.gmail.com>
2008-08-06  4:05   ` Jeff Chua
2008-08-06  5:19 ` David Miller
2008-08-06  6:42   ` Jeff Chua
2008-08-06  7:18     ` David Miller
2008-08-06  9:33       ` Jeff Chua
2008-08-06  9:36         ` David Miller
2008-08-06  9:50           ` Jeff Chua
2008-08-06  8:49     ` Yinghai Lu
2008-08-06  9:35       ` Jeff Chua
2008-08-06  9:42         ` Jeff Chua
2008-08-06  6:01 ` Linus Torvalds
2008-08-06  6:42   ` Jeff Chua
2008-08-06 15:33     ` Jeff Chua
2008-08-11 19:59       ` Ingo Molnar
2008-08-11 20:03         ` Yinghai Lu
2008-08-11 20:08           ` Ingo Molnar
2008-08-11 20:12             ` Yinghai Lu
2008-08-11 20:36               ` Yinghai Lu
2008-08-11 20:44                 ` Ingo Molnar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-08-06 11:09 Jeff Chua
2008-08-06 16:13 ` Yinghai Lu
2008-08-06 16:34   ` Jeff Chua
2008-08-11 19:54 ` Ingo Molnar
2008-08-13 14:16 ` Ingo Molnar
2008-08-13 17:10   ` Jeff Chua
2008-08-13 17:33     ` Jeff Chua
2008-08-13 17:39       ` Ingo Molnar
2008-08-13 17:46         ` Yinghai Lu
2008-08-13 18:33           ` Yinghai Lu
2008-08-14  7:16             ` Jeff Chua
2008-08-14  8:59               ` Yinghai Lu
2008-08-14  9:07               ` Ingo Molnar
2008-08-15 10:34 Jeff Chua
2008-08-15 14:07 ` Ingo Molnar
2008-08-18  3:07   ` Jeff Chua
2008-08-18  8:00     ` Ingo Molnar

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=20080811204404.GD10774@elte.hu \
    --to=mingo@elte.hu \
    --cc=davem@davemloft.net \
    --cc=jeff.chua.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=maxk@qualcomm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=yhlu.kernel@gmail.com \
    /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 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.