]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: fix 2.6.27rc1 cannot boot more than 8CPUs
authorYinghai Lu <yhlu.kernel@gmail.com>
Mon, 11 Aug 2008 20:36:04 +0000 (13:36 -0700)
committerIngo Molnar <mingo@elte.hu>
Mon, 11 Aug 2008 20:42:59 +0000 (22:42 +0200)
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
arch/x86/kernel/smpboot.c

index 6e5823b9e765973b8daff631aa17eb10b8365a76..68b48e3fbcbd92b7115ac90cb59cd9c1d3bc4054 100644 (file)
@@ -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();
index da10f07fc59cbf2b95e96456f6355917694ece7c..91055d7fc1b0444d3e1446181216a06db2ce6978 100644 (file)
@@ -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;