diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/topology.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/smpboot.c | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 45da5dc50fc8..168203c0c316 100644 --- a/arch/x86/include/asm/topology.h +++ b/arch/x86/include/asm/topology.h | |||
@@ -231,6 +231,7 @@ static inline int node_to_first_cpu(int node) | |||
231 | #endif | 231 | #endif |
232 | 232 | ||
233 | extern cpumask_t cpu_coregroup_map(int cpu); | 233 | extern cpumask_t cpu_coregroup_map(int cpu); |
234 | extern const struct cpumask *cpu_coregroup_mask(int cpu); | ||
234 | 235 | ||
235 | #ifdef ENABLE_TOPO_DEFINES | 236 | #ifdef ENABLE_TOPO_DEFINES |
236 | #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) | 237 | #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id) |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 468c2f9d47ae..d5274b6b088e 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -497,7 +497,7 @@ void __cpuinit set_cpu_sibling_map(int cpu) | |||
497 | } | 497 | } |
498 | 498 | ||
499 | /* maps the cpu to the sched domain representing multi-core */ | 499 | /* maps the cpu to the sched domain representing multi-core */ |
500 | cpumask_t cpu_coregroup_map(int cpu) | 500 | const struct cpumask *cpu_coregroup_mask(int cpu) |
501 | { | 501 | { |
502 | struct cpuinfo_x86 *c = &cpu_data(cpu); | 502 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
503 | /* | 503 | /* |
@@ -505,9 +505,14 @@ cpumask_t cpu_coregroup_map(int cpu) | |||
505 | * And for power savings, we return cpu_core_map | 505 | * And for power savings, we return cpu_core_map |
506 | */ | 506 | */ |
507 | if (sched_mc_power_savings || sched_smt_power_savings) | 507 | if (sched_mc_power_savings || sched_smt_power_savings) |
508 | return per_cpu(cpu_core_map, cpu); | 508 | return &per_cpu(cpu_core_map, cpu); |
509 | else | 509 | else |
510 | return c->llc_shared_map; | 510 | return &c->llc_shared_map; |
511 | } | ||
512 | |||
513 | cpumask_t cpu_coregroup_map(int cpu) | ||
514 | { | ||
515 | return *cpu_coregroup_mask(cpu); | ||
511 | } | 516 | } |
512 | 517 | ||
513 | static void impress_friends(void) | 518 | static void impress_friends(void) |