x86: fix 2.6.27rc1 cannot boot more than 8CPUs
[firefly-linux-kernel-4.4.55.git] / arch / x86 / kernel / smpboot.c
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;