diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-10-20 17:04:18 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-10-20 17:06:57 -0400 |
commit | a06f916b7a9b57447ceb875eb0a89f1a66b31bca (patch) | |
tree | a8a9d7c5e91a08f253107ffcf066dbeb4f7d9d34 /arch/arm/mach-vexpress/ct-ca9x4.c | |
parent | 5a567d78c437e3be1c512734cdfe64b4ae6b82d7 (diff) |
ARM: smp: fix clipping of number of CPUs
Rather than clipping the number of CPUs using the compile-time NR_CPUS
constant, use the runtime nr_cpu_ids value instead. This allows the
nr_cpus command line option to work as expected.
Cc: <stable@kernel.org>
Reported-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-vexpress/ct-ca9x4.c')
-rw-r--r-- | arch/arm/mach-vexpress/ct-ca9x4.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c index bfd32f52c2db..2b1e836a76ed 100644 --- a/arch/arm/mach-vexpress/ct-ca9x4.c +++ b/arch/arm/mach-vexpress/ct-ca9x4.c | |||
@@ -221,6 +221,12 @@ static void ct_ca9x4_init_cpu_map(void) | |||
221 | { | 221 | { |
222 | int i, ncores = scu_get_core_count(MMIO_P2V(A9_MPCORE_SCU)); | 222 | int i, ncores = scu_get_core_count(MMIO_P2V(A9_MPCORE_SCU)); |
223 | 223 | ||
224 | if (ncores > nr_cpu_ids) { | ||
225 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", | ||
226 | ncores, nr_cpu_ids); | ||
227 | ncores = nr_cpu_ids; | ||
228 | } | ||
229 | |||
224 | for (i = 0; i < ncores; ++i) | 230 | for (i = 0; i < ncores; ++i) |
225 | set_cpu_possible(i, true); | 231 | set_cpu_possible(i, true); |
226 | 232 | ||