diff options
| -rw-r--r-- | arch/powerpc/kernel/paca.c | 2 | ||||
| -rw-r--r-- | arch/powerpc/kernel/setup-common.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c index f4adf89d7614..10f0aadee95b 100644 --- a/arch/powerpc/kernel/paca.c +++ b/arch/powerpc/kernel/paca.c | |||
| @@ -203,7 +203,7 @@ void __init free_unused_pacas(void) | |||
| 203 | { | 203 | { |
| 204 | int new_size; | 204 | int new_size; |
| 205 | 205 | ||
| 206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus()); | 206 | new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); |
| 207 | 207 | ||
| 208 | if (new_size >= paca_size) | 208 | if (new_size >= paca_size) |
| 209 | return; | 209 | return; |
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 9d4882a46647..21f30cb68077 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
| @@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void) | |||
| 509 | */ | 509 | */ |
| 510 | cpu_init_thread_core_maps(nthreads); | 510 | cpu_init_thread_core_maps(nthreads); |
| 511 | 511 | ||
| 512 | /* Now that possible cpus are set, set nr_cpu_ids for later use */ | ||
| 513 | nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1; | ||
| 514 | |||
| 512 | free_unused_pacas(); | 515 | free_unused_pacas(); |
| 513 | } | 516 | } |
| 514 | #endif /* CONFIG_SMP */ | 517 | #endif /* CONFIG_SMP */ |
