powerpc/prom: early_init_dt_scan_cpus() updates cpu features only once

All our cpu feature updates were done for every CPU in the device-tree,
thus overwriting the cputable bits over and over again. Instead do them
only for the boot CPU.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
Benjamin Herrenschmidt 2014-03-28 13:36:28 +11:00
parent 36ae37e343
commit 7222f779ac

View file

@ -347,12 +347,14 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
#endif #endif
} }
if (found >= 0) { /* Not the boot CPU */
if (found < 0)
return 0;
DBG("boot cpu: logical %d physical %d\n", found, DBG("boot cpu: logical %d physical %d\n", found,
be32_to_cpu(intserv[found_thread])); be32_to_cpu(intserv[found_thread]));
boot_cpuid = found; boot_cpuid = found;
set_hard_smp_processor_id(found, set_hard_smp_processor_id(found, be32_to_cpu(intserv[found_thread]));
be32_to_cpu(intserv[found_thread]));
/* /*
* PAPR defines "logical" PVR values for cpus that * PAPR defines "logical" PVR values for cpus that
@ -373,7 +375,6 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
identify_cpu(0, be32_to_cpup(prop)); identify_cpu(0, be32_to_cpup(prop));
identical_pvr_fixup(node); identical_pvr_fixup(node);
}
check_cpu_feature_properties(node); check_cpu_feature_properties(node);
check_cpu_pa_features(node); check_cpu_pa_features(node);
@ -385,7 +386,6 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
else else
cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT; cur_cpu_spec->cpu_features &= ~CPU_FTR_SMT;
#endif #endif
return 0; return 0;
} }