Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit decebccd authored by James Hogan's avatar James Hogan Committed by Ralf Baechle
Browse files

MIPS: dump_tlb: Take EHINV bit into account



The EHINV bit in EntryHi allows a TLB entry to be properly marked
invalid so that EntryHi doesn't have to be set to a unique value to
avoid machine check exceptions due to multiple matching entries.

Unfortunately dump_tlb() doesn't take this into account so it will print
all the uninteresting invalid TLB entries if the current ASID happens to
be 00. Therefore add a condition to skip entries which are marked
invalid with the EHINV bit.

Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10076/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 48269c78
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -67,6 +67,9 @@ static void dump_tlb(int first, int last)
		entrylo0 = read_c0_entrylo0();
		entrylo0 = read_c0_entrylo0();
		entrylo1 = read_c0_entrylo1();
		entrylo1 = read_c0_entrylo1();


		/* EHINV bit marks entire entry as invalid */
		if (cpu_has_tlbinv && entryhi & MIPS_ENTRYHI_EHINV)
			continue;
		/*
		/*
		 * Prior to tlbinv, unused entries have a virtual address of
		 * Prior to tlbinv, unused entries have a virtual address of
		 * CKSEG0.
		 * CKSEG0.