Skip to content

Commit 48caebf

Browse files
committed
arm64: Print physical address of page table base in show_pte()
When dumping the page table in response to an unexpected kernel page fault, we print the virtual (hashed) address of the page table base, but display physical addresses for everything else. Make the page table dumping code in show_pte() consistent, by printing the page table base pointer as a physical address. Reported-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent 84c187a commit 48caebf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/arm64/mm/fault.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,10 @@ static void show_pte(unsigned long addr)
171171
return;
172172
}
173173

174-
pr_alert("%s pgtable: %luk pages, %u-bit VAs, pgdp = %p\n",
174+
pr_alert("%s pgtable: %luk pages, %u-bit VAs, pgdp=%016lx\n",
175175
mm == &init_mm ? "swapper" : "user", PAGE_SIZE / SZ_1K,
176-
mm == &init_mm ? VA_BITS : (int) vabits_user, mm->pgd);
176+
mm == &init_mm ? VA_BITS : (int)vabits_user,
177+
(unsigned long)virt_to_phys(mm->pgd));
177178
pgdp = pgd_offset(mm, addr);
178179
pgd = READ_ONCE(*pgdp);
179180
pr_alert("[%016lx] pgd=%016llx", addr, pgd_val(pgd));

0 commit comments

Comments
 (0)