diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-03 14:29:53 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-20 10:08:27 -0500 |
commit | 8975b6c0fdd57e061f4d1040163778ceaf340ad8 (patch) | |
tree | 23e2b750f79b69c6610ecb8061b3aa2d027f9dc8 /arch/arm/mach-vexpress | |
parent | bbc3d14e9aca023bb98e580aa1c9350af8effdb1 (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-vexpress')
-rw-r--r-- | arch/arm/mach-vexpress/platsmp.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/arm/mach-vexpress/platsmp.c b/arch/arm/mach-vexpress/platsmp.c index 276f916014c1..b5a758683668 100644 --- a/arch/arm/mach-vexpress/platsmp.c +++ b/arch/arm/mach-vexpress/platsmp.c | |||
@@ -124,13 +124,6 @@ void __init smp_init_cpus(void) | |||
124 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; | 124 | ncores = scu_base ? scu_get_core_count(scu_base) : 1; |
125 | 125 | ||
126 | /* sanity check */ | 126 | /* sanity check */ |
127 | if (ncores == 0) { | ||
128 | printk(KERN_ERR | ||
129 | "vexpress: strange CM count of 0? Default to 1\n"); | ||
130 | |||
131 | ncores = 1; | ||
132 | } | ||
133 | |||
134 | if (ncores > NR_CPUS) { | 127 | if (ncores > NR_CPUS) { |
135 | printk(KERN_WARNING | 128 | printk(KERN_WARNING |
136 | "vexpress: no. of cores (%d) greater than configured " | 129 | "vexpress: no. of cores (%d) greater than configured " |