aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/smpboot.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index a778e221ccfb..23913785c262 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1261,39 +1261,8 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
1261 check_nmi_watchdog(); 1261 check_nmi_watchdog();
1262} 1262}
1263 1263
1264#ifdef CONFIG_HOTPLUG_CPU
1265
1266static void remove_siblinginfo(int cpu)
1267{
1268 int sibling;
1269 struct cpuinfo_x86 *c = &cpu_data(cpu);
1270
1271 for_each_cpu_mask_nr(sibling, per_cpu(cpu_core_map, cpu)) {
1272 cpu_clear(cpu, per_cpu(cpu_core_map, sibling));
1273 /*/
1274 * last thread sibling in this cpu core going down
1275 */
1276 if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1)
1277 cpu_data(sibling).booted_cores--;
1278 }
1279
1280 for_each_cpu_mask_nr(sibling, per_cpu(cpu_sibling_map, cpu))
1281 cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling));
1282 cpus_clear(per_cpu(cpu_sibling_map, cpu));
1283 cpus_clear(per_cpu(cpu_core_map, cpu));
1284 c->phys_proc_id = 0;
1285 c->cpu_core_id = 0;
1286 cpu_clear(cpu, cpu_sibling_setup_map);
1287}
1288
1289static int additional_cpus __initdata = -1; 1264static int additional_cpus __initdata = -1;
1290 1265
1291static __init int setup_additional_cpus(char *s)
1292{
1293 return s && get_option(&s, &additional_cpus) ? 0 : -EINVAL;
1294}
1295early_param("additional_cpus", setup_additional_cpus);
1296
1297/* 1266/*
1298 * cpu_possible_map should be static, it cannot change as cpu's 1267 * cpu_possible_map should be static, it cannot change as cpu's
1299 * are onlined, or offlined. The reason is per-cpu data-structures 1268 * are onlined, or offlined. The reason is per-cpu data-structures
@@ -1340,6 +1309,37 @@ __init void prefill_possible_map(void)
1340 nr_cpu_ids = possible; 1309 nr_cpu_ids = possible;
1341} 1310}
1342 1311
1312#ifdef CONFIG_HOTPLUG_CPU
1313
1314static void remove_siblinginfo(int cpu)
1315{
1316 int sibling;
1317 struct cpuinfo_x86 *c = &cpu_data(cpu);
1318
1319 for_each_cpu_mask_nr(sibling, per_cpu(cpu_core_map, cpu)) {
1320 cpu_clear(cpu, per_cpu(cpu_core_map, sibling));
1321 /*/
1322 * last thread sibling in this cpu core going down
1323 */
1324 if (cpus_weight(per_cpu(cpu_sibling_map, cpu)) == 1)
1325 cpu_data(sibling).booted_cores--;
1326 }
1327
1328 for_each_cpu_mask_nr(sibling, per_cpu(cpu_sibling_map, cpu))
1329 cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling));
1330 cpus_clear(per_cpu(cpu_sibling_map, cpu));
1331 cpus_clear(per_cpu(cpu_core_map, cpu));
1332 c->phys_proc_id = 0;
1333 c->cpu_core_id = 0;
1334 cpu_clear(cpu, cpu_sibling_setup_map);
1335}
1336
1337static __init int setup_additional_cpus(char *s)
1338{
1339 return s && get_option(&s, &additional_cpus) ? 0 : -EINVAL;
1340}
1341early_param("additional_cpus", setup_additional_cpus);
1342
1343static void __ref remove_cpu_from_maps(int cpu) 1343static void __ref remove_cpu_from_maps(int cpu)
1344{ 1344{
1345 cpu_clear(cpu, cpu_online_map); 1345 cpu_clear(cpu, cpu_online_map);