summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/paca.c
diff options
context:
space:
mode:
authorRyan Grimm <grimm@us.ibm.com>2011-03-31 19:33:02 (GMT)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-05 06:22:11 (GMT)
commitc1854e00727f50f7ac99e98d26ece04c087ef785 (patch)
tree836a9b3cbf097ffcc650e91db2a83c9f83d0d3d5 /arch/powerpc/kernel/paca.c
parentf86d6b9b36a5d0923fa2abaacd425e328668fe16 (diff)
downloadlinux-c1854e00727f50f7ac99e98d26ece04c087ef785.tar.xz
powerpc: Set nr_cpu_ids early and use it to free PACAs
Without this, "holes" in the CPU numbering can cause us to free too many PACAs Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/paca.c')
-rw-r--r--arch/powerpc/kernel/paca.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index f4adf89..10f0aad 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -203,7 +203,7 @@ void __init free_unused_pacas(void)
{
int new_size;
- new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus());
+ new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids);
if (new_size >= paca_size)
return;