Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
[sfrench/cifs-2.6.git] / arch / x86_64 / kernel / smpboot.c
index 9800147c4c68e86fa9fefa848c4d7e73cdfb59e5..daf19332f0dd02ed7ab4257e5c887989dfeb0ef8 100644 (file)
@@ -60,6 +60,7 @@
 #include <asm/irq.h>
 #include <asm/hw_irq.h>
 #include <asm/numa.h>
+#include <asm/genapic.h>
 
 /* Number of siblings per CPU package */
 int smp_num_siblings = 1;
@@ -1169,6 +1170,13 @@ int __cpuinit __cpu_up(unsigned int cpu)
 
        while (!cpu_isset(cpu, cpu_online_map))
                cpu_relax();
+
+       if (num_online_cpus() > 8 && genapic == &apic_flat) {
+               printk(KERN_WARNING
+                      "flat APIC routing can't be used with > 8 cpus\n");
+               BUG();
+       }
+
        err = 0;
 
        return err;