diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 332512767f4f..91055d7fc1b0 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -326,12 +326,16 @@ static void __cpuinit start_secondary(void *unused) | |||
326 | * for which cpus receive the IPI. Holding this | 326 | * for which cpus receive the IPI. Holding this |
327 | * lock helps us to not include this cpu in a currently in progress | 327 | * lock helps us to not include this cpu in a currently in progress |
328 | * smp_call_function(). | 328 | * smp_call_function(). |
329 | * | ||
330 | * We need to hold vector_lock so there the set of online cpus | ||
331 | * does not change while we are assigning vectors to cpus. Holding | ||
332 | * this lock ensures we don't half assign or remove an irq from a cpu. | ||
329 | */ | 333 | */ |
330 | ipi_call_lock_irq(); | 334 | ipi_call_lock_irq(); |
331 | #ifdef CONFIG_X86_IO_APIC | 335 | lock_vector_lock(); |
332 | setup_vector_irq(smp_processor_id()); | 336 | __setup_vector_irq(smp_processor_id()); |
333 | #endif | ||
334 | cpu_set(smp_processor_id(), cpu_online_map); | 337 | cpu_set(smp_processor_id(), cpu_online_map); |
338 | unlock_vector_lock(); | ||
335 | ipi_call_unlock_irq(); | 339 | ipi_call_unlock_irq(); |
336 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 340 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
337 | 341 | ||
@@ -990,7 +994,17 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
990 | flush_tlb_all(); | 994 | flush_tlb_all(); |
991 | low_mappings = 1; | 995 | low_mappings = 1; |
992 | 996 | ||
997 | #ifdef CONFIG_X86_PC | ||
998 | if (def_to_bigsmp && apicid > 8) { | ||
999 | printk(KERN_WARNING | ||
1000 | "More than 8 CPUs detected - skipping them.\n" | ||
1001 | "Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n"); | ||
1002 | err = -1; | ||
1003 | } else | ||
1004 | err = do_boot_cpu(apicid, cpu); | ||
1005 | #else | ||
993 | err = do_boot_cpu(apicid, cpu); | 1006 | err = do_boot_cpu(apicid, cpu); |
1007 | #endif | ||
994 | 1008 | ||
995 | zap_low_mappings(); | 1009 | zap_low_mappings(); |
996 | low_mappings = 0; | 1010 | low_mappings = 0; |
@@ -1336,7 +1350,9 @@ int __cpu_disable(void) | |||
1336 | remove_siblinginfo(cpu); | 1350 | remove_siblinginfo(cpu); |
1337 | 1351 | ||
1338 | /* It's now safe to remove this processor from the online map */ | 1352 | /* It's now safe to remove this processor from the online map */ |
1353 | lock_vector_lock(); | ||
1339 | remove_cpu_from_maps(cpu); | 1354 | remove_cpu_from_maps(cpu); |
1355 | unlock_vector_lock(); | ||
1340 | fixup_irqs(cpu_online_map); | 1356 | fixup_irqs(cpu_online_map); |
1341 | return 0; | 1357 | return 0; |
1342 | } | 1358 | } |