]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/smpboot.c
Merge branch 'linus' into x86/core
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / smpboot.c
index 626618bf2f819f378053ba4be9476c0bf9a70903..04f78ab51b45a8a7121c82e960c133a2d6ddc81c 100644 (file)
@@ -327,12 +327,16 @@ static void __cpuinit start_secondary(void *unused)
         * for which cpus receive the IPI. Holding this
         * lock helps us to not include this cpu in a currently in progress
         * smp_call_function().
+        *
+        * We need to hold vector_lock so there the set of online cpus
+        * does not change while we are assigning vectors to cpus.  Holding
+        * this lock ensures we don't half assign or remove an irq from a cpu.
         */
        ipi_call_lock_irq();
-#ifdef CONFIG_X86_IO_APIC
-       setup_vector_irq(smp_processor_id());
-#endif
+       lock_vector_lock();
+       __setup_vector_irq(smp_processor_id());
        cpu_set(smp_processor_id(), cpu_online_map);
+       unlock_vector_lock();
        ipi_call_unlock_irq();
        per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
 
@@ -983,7 +987,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;
@@ -1336,7 +1350,9 @@ int __cpu_disable(void)
        remove_siblinginfo(cpu);
 
        /* It's now safe to remove this processor from the online map */
+       lock_vector_lock();
        remove_cpu_from_maps(cpu);
+       unlock_vector_lock();
        fixup_irqs(cpu_online_map);
        return 0;
 }