Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: R3000: Fix debug output for Virtual page number

Virtual page number of R3000 in entryhi is 20 bit from MSB. But in
dump_tlb(), the bit mask to read it from entryhi is 19 bit (0xffffe000).
The patch fixes that to 0xfffff000.

Signed-off-by: Isamu Mogi <isamu@leafytree.jp>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8290/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Isamu Mogi and committed by
Ralf Baechle
491a48aa 00977610

+2 -2
+2 -2
arch/mips/lib/r3k_dump_tlb.c
··· 34 34 entrylo0 = read_c0_entrylo0(); 35 35 36 36 /* Unused entries have a virtual address of KSEG0. */ 37 - if ((entryhi & 0xffffe000) != 0x80000000 37 + if ((entryhi & 0xfffff000) != 0x80000000 38 38 && (entryhi & 0xfc0) == asid) { 39 39 /* 40 40 * Only print entries in use ··· 43 43 44 44 printk("va=%08lx asid=%08lx" 45 45 " [pa=%06lx n=%d d=%d v=%d g=%d]", 46 - (entryhi & 0xffffe000), 46 + (entryhi & 0xfffff000), 47 47 entryhi & 0xfc0, 48 48 entrylo0 & PAGE_MASK, 49 49 (entrylo0 & (1 << 11)) ? 1 : 0,