diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 31869bf5fabd..6bd4d9b73870 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -496,7 +496,7 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
496 | } | 496 | } |
497 | 497 | ||
498 | /* maps the cpu to the sched domain representing multi-core */ | 498 | /* maps the cpu to the sched domain representing multi-core */ |
499 | cpumask_t cpu_coregroup_map(int cpu) | 499 | const struct cpumask *cpu_coregroup_mask(int cpu) |
500 | { | 500 | { |
501 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 501 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
502 | /* | 502 | /* |
@@ -504,9 +504,14 @@ cpumask_t cpu_coregroup_map(int cpu) | |||
504 | * And for power savings, we return cpu_core_map | 504 | * And for power savings, we return cpu_core_map |
505 | */ | 505 | */ |
506 | if (sched_mc_power_savings || sched_smt_power_savings) | 506 | if (sched_mc_power_savings || sched_smt_power_savings) |
507 | return per_cpu(cpu_core_map, cpu); | 507 | return &per_cpu(cpu_core_map, cpu); |
508 | else | 508 | else |
509 | return c->llc_shared_map; | 509 | return &c->llc_shared_map; |
510 | } | ||
511 | |||
512 | cpumask_t cpu_coregroup_map(int cpu) | ||
513 | { | ||
514 | return *cpu_coregroup_mask(cpu); | ||
510 | } | 515 | } |
511 | 516 | ||
512 | static void impress_friends(void) | 517 | static void impress_friends(void) |
@@ -1149,7 +1154,7 @@ static void __init smp_cpu_index_default(void) | |||
1149 | for_each_possible_cpu(i) { | 1154 | for_each_possible_cpu(i) { |
1150 | c = &cpu_data(i); | 1155 | c = &cpu_data(i); |
1151 | /* mark all to hotplug */ | 1156 | /* mark all to hotplug */ |
1152 | c->cpu_index = NR_CPUS; | 1157 | c->cpu_index = nr_cpu_ids; |
1153 | } | 1158 | } |
1154 | } | 1159 | } |
1155 | 1160 | ||
@@ -1293,6 +1298,8 @@ __init void prefill_possible_map(void) | |||
1293 | else | 1298 | else |
1294 | possible = setup_possible_cpus; | 1299 | possible = setup_possible_cpus; |
1295 | 1300 | ||
1301 | total_cpus = max_t(int, possible, num_processors + disabled_cpus); | ||
1302 | |||
1296 | if (possible > CONFIG_NR_CPUS) { | 1303 | if (possible > CONFIG_NR_CPUS) { |
1297 | printk(KERN_WARNING | 1304 | printk(KERN_WARNING |
1298 | "%d Processors exceeds NR_CPUS limit of %d\n", | 1305 | "%d Processors exceeds NR_CPUS limit of %d\n", |