aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-03-13 00:19:54 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-03-13 00:19:54 -0400
commit4f0628963c86d2f97b8cb9acc024a7fe288a6a57 (patch)
tree83e7592c0706f96979628802344d886481a98b07 /arch/x86/kernel/smpboot.c
parent3f76a183de8ad3aeb7425f3d9685bb6003abd1a5 (diff)
cpumask: use new cpumask functions throughout x86
Impact: cleanup 1) &cpu_online_map -> cpu_online_mask 2) first_cpu/next_cpu_nr -> cpumask_first/cpumask_next 3) cpu_*_map manipulation -> init_cpu_* / set_cpu_* Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index d6427aa56966..58d24ef917d8 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -296,7 +296,7 @@ notrace static void __cpuinit start_secondary(void *unused)
296 __flush_tlb_all(); 296 __flush_tlb_all();
297#endif 297#endif
298 298
299 /* This must be done before setting cpu_online_map */ 299 /* This must be done before setting cpu_online_mask */
300 set_cpu_sibling_map(raw_smp_processor_id()); 300 set_cpu_sibling_map(raw_smp_processor_id());
301 wmb(); 301 wmb();
302 302
@@ -904,9 +904,8 @@ int __cpuinit native_cpu_up(unsigned int cpu)
904 */ 904 */
905static __init void disable_smp(void) 905static __init void disable_smp(void)
906{ 906{
907 /* use the read/write pointers to the present and possible maps */ 907 init_cpu_present(cpumask_of(0));
908 cpumask_copy(&cpu_present_map, cpumask_of(0)); 908 init_cpu_possible(cpumask_of(0));
909 cpumask_copy(&cpu_possible_map, cpumask_of(0));
910 smpboot_clear_io_apic_irqs(); 909 smpboot_clear_io_apic_irqs();
911 910
912 if (smp_found_config) 911 if (smp_found_config)
@@ -1149,11 +1148,11 @@ early_param("possible_cpus", _setup_possible_cpus);
1149 1148
1150 1149
1151/* 1150/*
1152 * cpu_possible_map should be static, it cannot change as cpu's 1151 * cpu_possible_mask should be static, it cannot change as cpu's
1153 * are onlined, or offlined. The reason is per-cpu data-structures 1152 * are onlined, or offlined. The reason is per-cpu data-structures
1154 * are allocated by some modules at init time, and dont expect to 1153 * are allocated by some modules at init time, and dont expect to
1155 * do this dynamically on cpu arrival/departure. 1154 * do this dynamically on cpu arrival/departure.
1156 * cpu_present_map on the other hand can change dynamically. 1155 * cpu_present_mask on the other hand can change dynamically.
1157 * In case when cpu_hotplug is not compiled, then we resort to current 1156 * In case when cpu_hotplug is not compiled, then we resort to current
1158 * behaviour, which is cpu_possible == cpu_present. 1157 * behaviour, which is cpu_possible == cpu_present.
1159 * - Ashok Raj 1158 * - Ashok Raj