mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 14:42:37 +02:00
UPSTREAM: MIPS: CPS: Prevent multi-core with dcache aliasing
Systems using the MIPS Coherence Manager (CM) cannot support multi-core
SMP with dcache aliasing. This is because CPU caches are VIPT, but
interventions in CM-based systems provide only the physical address to
remote caches. This means that interventions may behave incorrectly in
the presence of an aliasing dcache, since the physical address used
when handling an intervention may lead to operation on an aliased cache
line rather than the correct line.
Prevent us from running into this issue by refusing to boot secondary
cores in systems where dcache aliasing may occur.
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16196/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
(cherry picked from commit 5570ba2ee9)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
8ff67c307f
commit
dc57940773
|
|
@ -140,9 +140,11 @@ static void __init cps_prepare_cpus(unsigned int max_cpus)
|
|||
|
||||
/* Warn the user if the CCA prevents multi-core */
|
||||
ncores = mips_cm_numcores();
|
||||
if (cca_unsuitable && ncores > 1) {
|
||||
pr_warn("Using only one core due to unsuitable CCA 0x%x\n",
|
||||
cca);
|
||||
if ((cca_unsuitable || cpu_has_dc_aliases) && ncores > 1) {
|
||||
pr_warn("Using only one core due to %s%s%s\n",
|
||||
cca_unsuitable ? "unsuitable CCA" : "",
|
||||
(cca_unsuitable && cpu_has_dc_aliases) ? " & " : "",
|
||||
cpu_has_dc_aliases ? "dcache aliasing" : "");
|
||||
|
||||
for_each_present_cpu(c) {
|
||||
if (cpu_data[c].core)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user