aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/smp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@hutch.davemloft.net>2007-06-04 20:01:39 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-06-05 00:50:00 -0400
commitf78eae2e6f5d1eb05f76a45486286445b916bd92 (patch)
tree0fa81e104ad9891afcaf18cdcb413c4a0f2ee8da /arch/sparc64/kernel/smp.c
parentd887ab3a9b1899f88b8cfba531e726b5fb2ebd14 (diff)
[SPARC64]: Proper multi-core scheduling support.
The scheduling domain hierarchy is: all cpus --> cpus that share an instruction cache --> cpus that share an integer execution unit Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/smp.c')
-rw-r--r--arch/sparc64/kernel/smp.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index c550bba3490a..68a45ac93375 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -51,6 +51,8 @@ cpumask_t cpu_online_map __read_mostly = CPU_MASK_NONE;
51cpumask_t phys_cpu_present_map __read_mostly = CPU_MASK_NONE; 51cpumask_t phys_cpu_present_map __read_mostly = CPU_MASK_NONE;
52cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly = 52cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly =
53 { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; 53 { [0 ... NR_CPUS-1] = CPU_MASK_NONE };
54cpumask_t cpu_core_map[NR_CPUS] __read_mostly =
55 { [0 ... NR_CPUS-1] = CPU_MASK_NONE };
54static cpumask_t smp_commenced_mask; 56static cpumask_t smp_commenced_mask;
55static cpumask_t cpu_callout_map; 57static cpumask_t cpu_callout_map;
56 58
@@ -1217,13 +1219,28 @@ void __devinit smp_fill_in_sib_core_maps(void)
1217 unsigned int j; 1219 unsigned int j;
1218 1220
1219 if (cpu_data(i).core_id == 0) { 1221 if (cpu_data(i).core_id == 0) {
1220 cpu_set(i, cpu_sibling_map[i]); 1222 cpu_set(i, cpu_core_map[i]);
1221 continue; 1223 continue;
1222 } 1224 }
1223 1225
1224 for_each_possible_cpu(j) { 1226 for_each_possible_cpu(j) {
1225 if (cpu_data(i).core_id == 1227 if (cpu_data(i).core_id ==
1226 cpu_data(j).core_id) 1228 cpu_data(j).core_id)
1229 cpu_set(j, cpu_core_map[i]);
1230 }
1231 }
1232
1233 for_each_possible_cpu(i) {
1234 unsigned int j;
1235
1236 if (cpu_data(i).proc_id == -1) {
1237 cpu_set(i, cpu_sibling_map[i]);
1238 continue;
1239 }
1240
1241 for_each_possible_cpu(j) {
1242 if (cpu_data(i).proc_id ==
1243 cpu_data(j).proc_id)
1227 cpu_set(j, cpu_sibling_map[i]); 1244 cpu_set(j, cpu_sibling_map[i]);
1228 } 1245 }
1229 } 1246 }