Re: [PATCH v3 06/14] x86: Physical address comparisons in fill_p*d/pte
From: Dave Hansen
Date: Fri Apr 04 2025 - 12:57:03 EST
On 4/4/25 06:14, Maciej Wieczor-Retman wrote:
> + if (__pa(p4d) != (pgtable_l5_enabled() ?
> + (unsigned long)pgd_val(*pgd) & PTE_PFN_MASK :
> + __pa(pgd)))
> printk(KERN_ERR "PAGETABLE BUG #00! %p <-> %p\n",
This one is pretty fugly. But I guess it's just one place and it
probably isn't worth refactoring this and the other helpers just for a
debug message.