Commit 5d3c3c7d authored by James Hogan's avatar James Hogan Committed by Ralf Baechle

MIPS: dump_tlb: Only dump PageGrain if interesting

The PageGrain register may not exist if certain architectural features
aren't present, therefore only print out its value when dumping the TLB
registers if it is expected to contain fields relevant to the TLB.

Fixes: d1e9a4f5 ("MIPS: Add SysRq operation to dump TLBs on all CPUs")
Reported-by: default avatarJoshua Kinard <kumba@gentoo.org>
Reported-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
Cc: Joshua Kinard <kumba@gentoo.org>
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10723/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent aaa7be48
......@@ -23,7 +23,8 @@ void dump_tlb_regs(void)
pr_info("EntryLo0 : %0*lx\n", field, read_c0_entrylo0());
pr_info("EntryLo1 : %0*lx\n", field, read_c0_entrylo1());
pr_info("Wired : %0x\n", read_c0_wired());
pr_info("PageGrain: %0x\n", read_c0_pagegrain());
if (cpu_has_small_pages || cpu_has_rixi || cpu_has_xpa)
pr_info("PageGrain: %0x\n", read_c0_pagegrain());
if (cpu_has_htw) {
pr_info("PWField : %0*lx\n", field, read_c0_pwfield());
pr_info("PWSize : %0*lx\n", field, read_c0_pwsize());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment