[RFC V2 01/14] mm: Abstract printing of pxd_val()

Mike Rapoport rppt at kernel.org
Sun May 17 11:57:50 PDT 2026


On Wed, May 13, 2026 at 10:15:34AM +0530, Anshuman Khandual wrote:
> Ahead of adding support for D128 pgtables, refactor places that print
> PTE values to use the new __PRIpte format specifier and __PRIpte_args()
> macro to prepare the argument(s). When using D128 pgtables in future,
> we can simply redefine __PRIpte and __PTIpte_args().
> 
> Besides there is also an assumption about pxd_val() being always capped
> at 'unsigned long long' size but that will not work for D128 pgtables.
> Just increase its size to u128 if the compiler supports via a separate
> data type pxdval_t which also defaults to existing 'unsigned long long'.
> 
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: David Hildenbrand <david at kernel.org>
> Cc: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
> Cc: Mike Rapoport <rppt at kernel.org>
> Cc: linux-mm at kvack.org
> Cc: linux-kernel at vger.kernel.org
> Signed-off-by: Anshuman Khandual <anshuman.khandual at arm.com>

Acked-by: Mike Rapoport (Microsoft) <rppt at kernel.org>

> ---
> Changes in RFC V2:
> 
> - Moved pxdval_t definition inside generic page table header per Mike
> - Restored print format in __print_bad_page_map_pgtable() per Usama
> - Renamed __PRIpte as __PRIpxx per David
> 
>  include/linux/pgtable.h | 11 +++++++++++
>  mm/memory.c             | 23 +++++++++++++----------
>  2 files changed, 24 insertions(+), 10 deletions(-)

-- 
Sincerely yours,
Mike.



More information about the linux-arm-kernel mailing list