Skip to content

Commit 74283cf

Browse files
maciej-w-rozyckitsbogend
authored andcommitted
MIPS: mm: Suppress TLB uniquification on EHINV hardware
Hardware that supports the EHINV feature, mandatory for R6 ISA and FTLB implementation, lets software mark TLB entries invalid, which eliminates the need to ensure no duplicate matching entries are ever created. This feature is already used by local_flush_tlb_all(), via the UNIQUE_ENTRYHI macro, making the preceding call to r4k_tlb_uniquify() superfluous. The next change will also modify uniquification code such that it'll become incompatible with the FTLB and MMID features, as well as MIPSr6 CPUs that do not implement 4KiB pages. Therefore prevent r4k_tlb_uniquify() from being used on EHINV hardware, as denoted by `cpu_has_tlbinv'. Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
1 parent 8374c2c commit 74283cf

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

arch/mips/mm/tlb-r4k.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,8 @@ static void r4k_tlb_configure(void)
640640
temp_tlb_entry = current_cpu_data.tlbsize - 1;
641641

642642
/* From this point on the ARC firmware is dead. */
643-
r4k_tlb_uniquify();
643+
if (!cpu_has_tlbinv)
644+
r4k_tlb_uniquify();
644645
local_flush_tlb_all();
645646

646647
/* Did I tell you that ARC SUCKS? */

0 commit comments

Comments
 (0)