aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s5pv310/platsmp.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-12-03 14:29:53 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-20 10:08:27 -0500
commit8975b6c0fdd57e061f4d1040163778ceaf340ad8 (patch)
tree23e2b750f79b69c6610ecb8061b3aa2d027f9dc8 /arch/arm/mach-s5pv310/platsmp.c
parentbbc3d14e9aca023bb98e580aa1c9350af8effdb1 (diff)
ARM: SMP: Clean up ncores sanity checks
scu_get_core_count() never returns zero cores, so we don't need to check and correct if ncores is zero. Tegra was missing the check against NR_CPUS, leading to a potential bitfield overflow if this becomes the case. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s5pv310/platsmp.c')
-rw-r--r--arch/arm/mach-s5pv310/platsmp.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/arm/mach-s5pv310/platsmp.c b/arch/arm/mach-s5pv310/platsmp.c
index d474426f37b7..560ada83b0b1 100644
--- a/arch/arm/mach-s5pv310/platsmp.c
+++ b/arch/arm/mach-s5pv310/platsmp.c
@@ -130,13 +130,6 @@ void __init smp_init_cpus(void)
130 ncores = scu_base ? scu_get_core_count(scu_base) : 1; 130 ncores = scu_base ? scu_get_core_count(scu_base) : 1;
131 131
132 /* sanity check */ 132 /* sanity check */
133 if (ncores == 0) {
134 printk(KERN_ERR
135 "S5PV310: strange CM count of 0? Default to 1\n");
136
137 ncores = 1;
138 }
139
140 if (ncores > NR_CPUS) { 133 if (ncores > NR_CPUS) {
141 printk(KERN_WARNING 134 printk(KERN_WARNING
142 "S5PV310: no. of cores (%d) greater than configured " 135 "S5PV310: no. of cores (%d) greater than configured "