aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap-smp.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-omap2/omap-smp.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-omap2/omap-smp.c')
-rw-r--r--arch/arm/mach-omap2/omap-smp.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 3c87468ce9cb..5f10f38354ae 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -121,12 +121,6 @@ void __init smp_init_cpus(void)
121 ncores = get_core_count(); 121 ncores = get_core_count();
122 122
123 /* sanity check */ 123 /* sanity check */
124 if (ncores == 0) {
125 printk(KERN_ERR
126 "OMAP4: strange core count of 0? Default to 1\n");
127 ncores = 1;
128 }
129
130 if (ncores > NR_CPUS) { 124 if (ncores > NR_CPUS) {
131 printk(KERN_WARNING 125 printk(KERN_WARNING
132 "OMAP4: no. of cores (%d) greater than configured " 126 "OMAP4: no. of cores (%d) greater than configured "