diff options
author | Paul Mackerras <paulus@samba.org> | 2007-06-07 08:42:19 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-06-13 21:56:17 -0400 |
commit | c63c4faa8cf055319c7ed557d2050c1c3776fac5 (patch) | |
tree | ed0515562cfa6e46a69cc035e53c7cee82654b0d /arch | |
parent | eedab661a51966c454e38c17266a531aa58b4a98 (diff) |
[POWERPC] Fix per-cpu allocation on oldworld SMP powermacs
The per-cpu area(a) for the secondary CPU(s) isn't getting allocated
on old SMP powermacs that don't have the secondary CPU(s) listed in
the device tree, as per-cpu areas are now only allocated for CPUs in
the cpu_possible_map, and we aren't setting the bits for the secondary
CPU(s) until smp_prepare_cpus(), which is after per-cpu allocation.
Therefore this sets the bits for CPUs 1..3 in cpu_possible_map in
pmac_setup_arch, so they get per-cpu data allocated.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/powermac/setup.c | 13 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/smp.c | 1 |
2 files changed, 12 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 07b1c4ec428d..956571526a57 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c | |||
@@ -363,8 +363,19 @@ static void __init pmac_setup_arch(void) | |||
363 | smp_ops = &core99_smp_ops; | 363 | smp_ops = &core99_smp_ops; |
364 | } | 364 | } |
365 | #ifdef CONFIG_PPC32 | 365 | #ifdef CONFIG_PPC32 |
366 | else | 366 | else { |
367 | /* | ||
368 | * We have to set bits in cpu_possible_map here since the | ||
369 | * secondary CPU(s) aren't in the device tree, and | ||
370 | * setup_per_cpu_areas only allocates per-cpu data for | ||
371 | * CPUs in the cpu_possible_map. | ||
372 | */ | ||
373 | int cpu; | ||
374 | |||
375 | for (cpu = 1; cpu < 4 && cpu < NR_CPUS; ++cpu) | ||
376 | cpu_set(cpu, cpu_possible_map); | ||
367 | smp_ops = &psurge_smp_ops; | 377 | smp_ops = &psurge_smp_ops; |
378 | } | ||
368 | #endif | 379 | #endif |
369 | #endif /* CONFIG_SMP */ | 380 | #endif /* CONFIG_SMP */ |
370 | 381 | ||
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c index 686ed82bde79..cb2d894541c6 100644 --- a/arch/powerpc/platforms/powermac/smp.c +++ b/arch/powerpc/platforms/powermac/smp.c | |||
@@ -317,7 +317,6 @@ static int __init smp_psurge_probe(void) | |||
317 | ncpus = NR_CPUS; | 317 | ncpus = NR_CPUS; |
318 | for (i = 1; i < ncpus ; ++i) { | 318 | for (i = 1; i < ncpus ; ++i) { |
319 | cpu_set(i, cpu_present_map); | 319 | cpu_set(i, cpu_present_map); |
320 | cpu_set(i, cpu_possible_map); | ||
321 | set_hard_smp_processor_id(i, i); | 320 | set_hard_smp_processor_id(i, i); |
322 | } | 321 | } |
323 | 322 | ||