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>
This commit is contained in:
@@ -129,12 +129,6 @@ void __init smp_init_cpus(void)
|
||||
unsigned int i, ncores = get_core_count();
|
||||
|
||||
/* sanity check */
|
||||
if (ncores == 0) {
|
||||
printk(KERN_ERR
|
||||
"U8500: strange CM count of 0? Default to 1\n");
|
||||
ncores = 1;
|
||||
}
|
||||
|
||||
if (ncores > NR_CPUS) {
|
||||
printk(KERN_WARNING
|
||||
"U8500: no. of cores (%d) greater than configured "
|
||||
|
Viittaa uudesa ongelmassa
Block a user