Re: [PATCH V3] mm: Standardize printing for pgtable entries
From: Matthew Wilcox
Date: Sat Jul 11 2026 - 00:59:10 EST
On Thu, Jul 09, 2026 at 10:13:34AM +0530, Anshuman Khandual wrote:
> @@ -532,34 +575,34 @@ static void __print_bad_page_map_pgtable(struct mm_struct *mm, unsigned long add
> * see locking requirements for print_bad_page_map().
> */
> pgdp = pgd_offset(mm, addr);
> - pgdv = pgd_val(*pgdp);
> + ptval_to_str(pgd_str, pgd_val(*pgdp));
>
> if (!pgd_present(*pgdp) || pgd_leaf(*pgdp)) {
> - pr_alert("pgd:%08llx\n", pgdv);
> + pr_alert("pgd:%s\n", pgd_str);
Why can't we do this as:
pr_alert("pgd:%*phN\n", sizeof(pgdv), &pgdv);
It'd save us all this stack space.