aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-14 08:58:01 -0400
committerIngo Molnar <mingo@elte.hu>2008-08-14 08:58:01 -0400
commit51ca3c679194e7435c25b8e77b0a73c597e41ae9 (patch)
treea681dca369607ab0f371d5246b0f75140b860a8a /arch/x86/kernel/smpboot.c
parentb55793f7528ce1b73c25b3ac8a86a6cda2a0f9a4 (diff)
parentb635acec48bcaa9183fcbf4e3955616b0d4119b5 (diff)
Merge branch 'linus' into x86/core
Conflicts: arch/x86/kernel/genapic_64.c include/asm-x86/kvm_host.h Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 626618bf2f81..04f78ab51b45 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -327,12 +327,16 @@ static void __cpuinit start_secondary(void *unused)
327 * for which cpus receive the IPI. Holding this 327 * for which cpus receive the IPI. Holding this
328 * lock helps us to not include this cpu in a currently in progress 328 * lock helps us to not include this cpu in a currently in progress
329 * smp_call_function(). 329 * smp_call_function().
330 *
331 * We need to hold vector_lock so there the set of online cpus
332 * does not change while we are assigning vectors to cpus. Holding
333 * this lock ensures we don't half assign or remove an irq from a cpu.
330 */ 334 */
331 ipi_call_lock_irq(); 335 ipi_call_lock_irq();
332#ifdef CONFIG_X86_IO_APIC 336 lock_vector_lock();
333 setup_vector_irq(smp_processor_id()); 337 __setup_vector_irq(smp_processor_id());
334#endif
335 cpu_set(smp_processor_id(), cpu_online_map); 338 cpu_set(smp_processor_id(), cpu_online_map);
339 unlock_vector_lock();
336 ipi_call_unlock_irq(); 340 ipi_call_unlock_irq();
337 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; 341 per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE;
338 342
@@ -983,7 +987,17 @@ int __cpuinit native_cpu_up(unsigned int cpu)
983 flush_tlb_all(); 987 flush_tlb_all();
984 low_mappings = 1; 988 low_mappings = 1;
985 989
990#ifdef CONFIG_X86_PC
991 if (def_to_bigsmp && apicid > 8) {
992 printk(KERN_WARNING
993 "More than 8 CPUs detected - skipping them.\n"
994 "Use CONFIG_X86_GENERICARCH and CONFIG_X86_BIGSMP.\n");
995 err = -1;
996 } else
997 err = do_boot_cpu(apicid, cpu);
998#else
986 err = do_boot_cpu(apicid, cpu); 999 err = do_boot_cpu(apicid, cpu);
1000#endif
987 1001
988 zap_low_mappings(); 1002 zap_low_mappings();
989 low_mappings = 0; 1003 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}