[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251110194754.47626-1-tsbogend@alpha.franken.de>
Date: Mon, 10 Nov 2025 20:47:53 +0100
From: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
To: Jiaxun Yang <jiaxun.yang@...goat.com>,
linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] MIPS: mm: Only uniquify on CPU cores where it's needed
Commit 35ad7e181541 ("MIPS: mm: tlb-r4k: Uniquify TLB entries on init")
switches initial TLB flushing to a mode needed for microAptiv/M5150
cores. This breaks (at least) R4x00 cores if the tlb probe hits
multiple matching TLB entries (SGI IP22 prom for examples sets up all
TLBs to the same virtual address). Use the new TLB flushing only on
M5150 and local_tlb_flush_all() for everything else.
Fixes: 35ad7e181541 ("MIPS: mm: tlb-r4k: Uniquify TLB entries on init")
Signed-off-by: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
---
arch/mips/mm/tlb-r4k.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 347126dc010d..c39a16d377a1 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -601,7 +601,10 @@ static void r4k_tlb_configure(void)
temp_tlb_entry = current_cpu_data.tlbsize - 1;
/* From this point on the ARC firmware is dead. */
- r4k_tlb_uniquify();
+ if (current_cpu_type() == CPU_M5150)
+ r4k_tlb_uniquify();
+ else
+ local_flush_tlb_all();
/* Did I tell you that ARC SUCKS? */
}
--
2.43.0
Powered by blists - more mailing lists