aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/smpboot.c16
-rw-r--r--arch/x86/kernel/smpboot_32.c14
-rw-r--r--arch/x86/kernel/smpboot_64.c14
3 files changed, 16 insertions, 28 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index d774520a6b48..644e60969f90 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1,6 +1,7 @@
1#include <linux/init.h> 1#include <linux/init.h>
2#include <linux/smp.h> 2#include <linux/smp.h>
3#include <linux/module.h> 3#include <linux/module.h>
4#include <linux/sched.h>
4 5
5/* Number of siblings per CPU package */ 6/* Number of siblings per CPU package */
6int smp_num_siblings = 1; 7int smp_num_siblings = 1;
@@ -95,6 +96,21 @@ void __cpuinit set_cpu_sibling_map(int cpu)
95 } 96 }
96} 97}
97 98
99/* maps the cpu to the sched domain representing multi-core */
100cpumask_t cpu_coregroup_map(int cpu)
101{
102 struct cpuinfo_x86 *c = &cpu_data(cpu);
103 /*
104 * For perf, we return last level cache shared map.
105 * And for power savings, we return cpu_core_map
106 */
107 if (sched_mc_power_savings || sched_smt_power_savings)
108 return per_cpu(cpu_core_map, cpu);
109 else
110 return c->llc_shared_map;
111}
112
113
98#ifdef CONFIG_HOTPLUG_CPU 114#ifdef CONFIG_HOTPLUG_CPU
99void remove_siblinginfo(int cpu) 115void remove_siblinginfo(int cpu)
100{ 116{
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index 322f46674d42..a58ca7f18013 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -260,20 +260,6 @@ static void __cpuinit smp_callin(void)
260 260
261static int cpucount; 261static int cpucount;
262 262
263/* maps the cpu to the sched domain representing multi-core */
264cpumask_t cpu_coregroup_map(int cpu)
265{
266 struct cpuinfo_x86 *c = &cpu_data(cpu);
267 /*
268 * For perf, we return last level cache shared map.
269 * And for power savings, we return cpu_core_map
270 */
271 if (sched_mc_power_savings || sched_smt_power_savings)
272 return per_cpu(cpu_core_map, cpu);
273 else
274 return c->llc_shared_map;
275}
276
277/* 263/*
278 * Activate a secondary processor. 264 * Activate a secondary processor.
279 */ 265 */
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index 329f9c53a335..1a592400d94f 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -211,20 +211,6 @@ void __cpuinit smp_callin(void)
211 cpu_set(cpuid, cpu_callin_map); 211 cpu_set(cpuid, cpu_callin_map);
212} 212}
213 213
214/* maps the cpu to the sched domain representing multi-core */
215cpumask_t cpu_coregroup_map(int cpu)
216{
217 struct cpuinfo_x86 *c = &cpu_data(cpu);
218 /*
219 * For perf, we return last level cache shared map.
220 * And for power savings, we return cpu_core_map
221 */
222 if (sched_mc_power_savings || sched_smt_power_savings)
223 return per_cpu(cpu_core_map, cpu);
224 else
225 return c->llc_shared_map;
226}
227
228/* 214/*
229 * Setup code on secondary processor (after comming out of the trampoline) 215 * Setup code on secondary processor (after comming out of the trampoline)
230 */ 216 */