diff options
Diffstat (limited to 'arch/sparc64/kernel/smp.c')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 19 |
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; | |||
51 | cpumask_t phys_cpu_present_map __read_mostly = CPU_MASK_NONE; | 51 | cpumask_t phys_cpu_present_map __read_mostly = CPU_MASK_NONE; |
52 | cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly = | 52 | cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly = |
53 | { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; | 53 | { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; |
54 | cpumask_t cpu_core_map[NR_CPUS] __read_mostly = | ||
55 | { [0 ... NR_CPUS-1] = CPU_MASK_NONE }; | ||
54 | static cpumask_t smp_commenced_mask; | 56 | static cpumask_t smp_commenced_mask; |
55 | static cpumask_t cpu_callout_map; | 57 | static 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 | } |