]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Respect nr_cpu_ids when calling set_cpu_possible and set_cpu_present
authorMilton Miller <miltonm@bga.com>
Tue, 10 May 2011 19:28:48 +0000 (19:28 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 19 May 2011 04:30:44 +0000 (14:30 +1000)
commitec60ea837868e750b8a384447d2dba8db1084844
treee0baad3eca513815d97127843471228efab99b00
parent0324cc4510977d6cb01374701857f90b2d4c79e6
powerpc: Respect nr_cpu_ids when calling set_cpu_possible and set_cpu_present

We should not set cpus above nr_cpu_ids to possible.  While we
will trigger a warning with CONFIG_CPUMASK_DEBUG, even then the mask
initializers will set the bits beyond what the iterators check and cause
nr_cpu_ids to increase.

Respecting nr_cpu_ids during setup will allow us to use it in our initial
paca allocation.  It can be reduced from NR_CPUS by the existing early param
nr_cpus=, which was added in 09854b7e123c0691d87e453d94cfb25926fb8edc (smp:
Use nr_cpus= to set nr_cpu_ids early).  We already call parse_early_parms
between finding the command line and allocating the pacas.

Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/setup-common.c