Skip to content

Commit 1eb34b6

Browse files
committed
arm64: fault: Print info about page table structure when dumping pte
Whilst debugging a remote crash, I noticed that show_pte is unhelpful when it comes to describing the structure of the page table being walked. This is easily fixed by printing out the page table (swapper vs user), page size and virtual address size when displaying the PGD address. Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 83016b2 commit 1eb34b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/arm64/mm/fault.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ void show_pte(unsigned long addr)
104104
return;
105105
}
106106

107-
pr_alert("pgd = %p\n", mm->pgd);
107+
pr_alert("%s pgtable: %luk pages, %u-bit VAs, pgd = %p\n",
108+
mm == &init_mm ? "swapper" : "user", PAGE_SIZE / SZ_1K,
109+
VA_BITS, mm->pgd);
108110
pgd = pgd_offset(mm, addr);
109111
pr_alert("[%016lx] *pgd=%016llx", addr, pgd_val(*pgd));
110112

0 commit comments

Comments
 (0)