aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/r3k_dump_tlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lib/r3k_dump_tlb.c')
-rw-r--r--arch/mips/lib/r3k_dump_tlb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/lib/r3k_dump_tlb.c b/arch/mips/lib/r3k_dump_tlb.c
index cfcbb5218b59..744f4a7bc49d 100644
--- a/arch/mips/lib/r3k_dump_tlb.c
+++ b/arch/mips/lib/r3k_dump_tlb.c
@@ -29,9 +29,10 @@ static void dump_tlb(int first, int last)
29{ 29{
30 int i; 30 int i;
31 unsigned int asid; 31 unsigned int asid;
32 unsigned long entryhi, entrylo0; 32 unsigned long entryhi, entrylo0, asid_mask;
33 33
34 asid = read_c0_entryhi() & ASID_MASK; 34 asid_mask = cpu_asid_mask(&current_cpu_data);
35 asid = read_c0_entryhi() & asid_mask;
35 36
36 for (i = first; i <= last; i++) { 37 for (i = first; i <= last; i++) {
37 write_c0_index(i<<8); 38 write_c0_index(i<<8);
@@ -46,7 +47,7 @@ static void dump_tlb(int first, int last)
46 /* Unused entries have a virtual address of KSEG0. */ 47 /* Unused entries have a virtual address of KSEG0. */
47 if ((entryhi & PAGE_MASK) != KSEG0 && 48 if ((entryhi & PAGE_MASK) != KSEG0 &&
48 (entrylo0 & R3K_ENTRYLO_G || 49 (entrylo0 & R3K_ENTRYLO_G ||
49 (entryhi & ASID_MASK) == asid)) { 50 (entryhi & asid_mask) == asid)) {
50 /* 51 /*
51 * Only print entries in use 52 * Only print entries in use
52 */ 53 */
@@ -55,7 +56,7 @@ static void dump_tlb(int first, int last)
55 printk("va=%08lx asid=%08lx" 56 printk("va=%08lx asid=%08lx"
56 " [pa=%06lx n=%d d=%d v=%d g=%d]", 57 " [pa=%06lx n=%d d=%d v=%d g=%d]",
57 entryhi & PAGE_MASK, 58 entryhi & PAGE_MASK,
58 entryhi & ASID_MASK, 59 entryhi & asid_mask,
59 entrylo0 & PAGE_MASK, 60 entrylo0 & PAGE_MASK,
60 (entrylo0 & R3K_ENTRYLO_N) ? 1 : 0, 61 (entrylo0 & R3K_ENTRYLO_N) ? 1 : 0,
61 (entrylo0 & R3K_ENTRYLO_D) ? 1 : 0, 62 (entrylo0 & R3K_ENTRYLO_D) ? 1 : 0,