summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorRusty Russell2008-12-26 12:53:41 +0100
committerRusty Russell2008-12-26 12:53:41 +0100
commit030bb203e01db12e3f2866799f4f03a114d06349 (patch)
tree38bfa99e9fa31aae3679964886d802d69108d0d7 /arch/x86/kernel/smpboot.c
parentcpumask: alpha: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_t... (diff)
downloadkernel-qcow2-linux-030bb203e01db12e3f2866799f4f03a114d06349.tar.gz
kernel-qcow2-linux-030bb203e01db12e3f2866799f4f03a114d06349.tar.xz
kernel-qcow2-linux-030bb203e01db12e3f2866799f4f03a114d06349.zip
cpumask: cpu_coregroup_mask(): x86
Impact: New API Like cpu_coregroup_map, but returns a (const) pointer. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Cc: Ingo Molnar <mingo@redhat.com>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c11
1 files changed, 8 insertions, 3 deletions
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)
}
/* maps the cpu to the sched domain representing multi-core */
-cpumask_t cpu_coregroup_map(int cpu)
+const struct cpumask *cpu_coregroup_mask(int cpu)
{
struct cpuinfo_x86 *c = &cpu_data(cpu);
/*
@@ -505,9 +505,14 @@ cpumask_t cpu_coregroup_map(int cpu)
* And for power savings, we return cpu_core_map
*/
if (sched_mc_power_savings || sched_smt_power_savings)
- return per_cpu(cpu_core_map, cpu);
+ return &per_cpu(cpu_core_map, cpu);
else
- return c->llc_shared_map;
+ return &c->llc_shared_map;
+}
+
+cpumask_t cpu_coregroup_map(int cpu)
+{
+ return *cpu_coregroup_mask(cpu);
}
static void impress_friends(void)