summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/r3k_dump_tlb.c
diff options
context:
space:
mode:
authorJames Hogan2015-05-19 10:50:35 +0200
committerRalf Baechle2015-06-21 21:52:35 +0200
commit48269c78fb04a84b4d190cac8e1fbf24ded53505 (patch)
treee67c274158fc49626b1bc4934781e30521f16d97 /arch/mips/lib/r3k_dump_tlb.c
parentMIPS: dump_tlb: Make use of EntryLo bit definitions (diff)
downloadkernel-qcow2-linux-48269c78fb04a84b4d190cac8e1fbf24ded53505.tar.gz
kernel-qcow2-linux-48269c78fb04a84b4d190cac8e1fbf24ded53505.tar.xz
kernel-qcow2-linux-48269c78fb04a84b4d190cac8e1fbf24ded53505.zip
MIPS: dump_tlb: Take global bit into account
The TLB only matches the ASID when the global bit isn't set, so dump_tlb() shouldn't really be skipping global entries just because the ASID doesn't match. Fix the condition to read the TLB entry's global bit from EntryLo0. Note that after a TLB read the global bits in both EntryLo registers reflect the same global bit in the TLB entry. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10079/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lib/r3k_dump_tlb.c')
-rw-r--r--arch/mips/lib/r3k_dump_tlb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/mips/lib/r3k_dump_tlb.c b/arch/mips/lib/r3k_dump_tlb.c
index e210f04b2bc3..1335e4394e33 100644
--- a/arch/mips/lib/r3k_dump_tlb.c
+++ b/arch/mips/lib/r3k_dump_tlb.c
@@ -35,8 +35,9 @@ static void dump_tlb(int first, int last)
entrylo0 = read_c0_entrylo0();
/* Unused entries have a virtual address of KSEG0. */
- if ((entryhi & PAGE_MASK) != KSEG0
- && (entryhi & ASID_MASK) == asid) {
+ if ((entryhi & PAGE_MASK) != KSEG0 &&
+ (entrylo0 & R3K_ENTRYLO_G ||
+ (entryhi & ASID_MASK) == asid)) {
/*
* Only print entries in use
*/