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-exynos4/platsmp.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-exynos4/platsmp.c')
-rw-r--r-- | arch/arm/mach-exynos4/platsmp.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mach-exynos4/platsmp.c b/arch/arm/mach-exynos4/platsmp.c index 7c2282c6ba81..a08c536923f9 100644 --- a/arch/arm/mach-exynos4/platsmp.c +++ b/arch/arm/mach-exynos4/platsmp.c | |||
@@ -191,12 +191,10 @@ void __init smp_init_cpus(void) | |||
191 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; | 191 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; |
192 | 192 | ||
193 | /* sanity check */ | 193 | /* sanity check */ |
194 | if (ncores > NR_CPUS) { | 194 | if (ncores > nr_cpu_ids) { |
195 | printk(KERN_WARNING | 195 | pr_warn("SMP: %u cores greater than maximum (%u), clipping\n", |
196 | "EXYNOS4: no. of cores (%d) greater than configured " | 196 | ncores, nr_cpu_ids); |
197 | "maximum of %d - clipping\n", | 197 | ncores = nr_cpu_ids; |
198 | ncores, NR_CPUS); | ||
199 | ncores = NR_CPUS; | ||
200 | } | 198 | } |
201 | 199 | ||
202 | for (i = 0; i < ncores; i++) | 200 | for (i = 0; i < ncores; i++) |