diff options
Diffstat (limited to 'arch/mips/lib/r3k_dump_tlb.c')
-rw-r--r-- | arch/mips/lib/r3k_dump_tlb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/mips/lib/r3k_dump_tlb.c b/arch/mips/lib/r3k_dump_tlb.c index 91615c2ef0cf..8327698b9937 100644 --- a/arch/mips/lib/r3k_dump_tlb.c +++ b/arch/mips/lib/r3k_dump_tlb.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/mm.h> | 9 | #include <linux/mm.h> |
10 | 10 | ||
11 | #include <asm/mipsregs.h> | 11 | #include <asm/mipsregs.h> |
12 | #include <asm/mmu_context.h> | ||
12 | #include <asm/page.h> | 13 | #include <asm/page.h> |
13 | #include <asm/pgtable.h> | 14 | #include <asm/pgtable.h> |
14 | #include <asm/tlbdebug.h> | 15 | #include <asm/tlbdebug.h> |
@@ -21,7 +22,7 @@ static void dump_tlb(int first, int last) | |||
21 | unsigned int asid; | 22 | unsigned int asid; |
22 | unsigned long entryhi, entrylo0; | 23 | unsigned long entryhi, entrylo0; |
23 | 24 | ||
24 | asid = read_c0_entryhi() & 0xfc0; | 25 | asid = ASID_MASK(read_c0_entryhi()); |
25 | 26 | ||
26 | for (i = first; i <= last; i++) { | 27 | for (i = first; i <= last; i++) { |
27 | write_c0_index(i<<8); | 28 | write_c0_index(i<<8); |
@@ -35,7 +36,7 @@ static void dump_tlb(int first, int last) | |||
35 | 36 | ||
36 | /* Unused entries have a virtual address of KSEG0. */ | 37 | /* Unused entries have a virtual address of KSEG0. */ |
37 | if ((entryhi & 0xffffe000) != 0x80000000 | 38 | if ((entryhi & 0xffffe000) != 0x80000000 |
38 | && (entryhi & 0xfc0) == asid) { | 39 | && (ASID_MASK(entryhi) == asid)) { |
39 | /* | 40 | /* |
40 | * Only print entries in use | 41 | * Only print entries in use |
41 | */ | 42 | */ |
@@ -44,7 +45,7 @@ static void dump_tlb(int first, int last) | |||
44 | printk("va=%08lx asid=%08lx" | 45 | printk("va=%08lx asid=%08lx" |
45 | " [pa=%06lx n=%d d=%d v=%d g=%d]", | 46 | " [pa=%06lx n=%d d=%d v=%d g=%d]", |
46 | (entryhi & 0xffffe000), | 47 | (entryhi & 0xffffe000), |
47 | entryhi & 0xfc0, | 48 | ASID_MASK(entryhi), |
48 | entrylo0 & PAGE_MASK, | 49 | entrylo0 & PAGE_MASK, |
49 | (entrylo0 & (1 << 11)) ? 1 : 0, | 50 | (entrylo0 & (1 << 11)) ? 1 : 0, |
50 | (entrylo0 & (1 << 10)) ? 1 : 0, | 51 | (entrylo0 & (1 << 10)) ? 1 : 0, |