[PATCH V2 0/2] arm64/mm: Standardize printing for pgtable entries

From: Anshuman Khandual

Date: Wed Sep 09 2026 - 00:02:48 EST


Standardize printing for pgtable entries using recently introduced generic
helper ptval_bytes_to_hex_str() in core MM which automatically enables 128
bits entries when added later.

But first move __check_safe_pte_update() outside <asm/pgtable.h> to avoid
a cyclic dependency while accessing these afore mentioned core MM helpers
defined in <linux/pgtable.h>. This replaces the original page table entry
print standardisation proposal which was part of the D128 series.

https://lore.kernel.org/linux-mm/20260729122452.3797443-11-anshuman.khandual@xxxxxxx/

This series applies on v7.3-rc2 but after the following.

https://lore.kernel.org/linux-mm/20260831054331.625505-1-anshuman.khandual@xxxxxxx/

Changes in V2:

- Moved __check_safe_pte_update() inside #ifdef CONFIG_DEBUG_VM
- Added empty stub for __check_safe_pte_update() when !CONFIG_DEBUG_VM
- Dropped IS_ENABLED(CONFIG_DEBUG_VM) from __check_safe_pte_update()
- Replaced pgtable level specific strings with pxd_str[] in show_pte()

Changes in V1:

https://lore.kernel.org/all/20260901065454.1906343-1-anshuman.khandual@xxxxxxx/

Cc: David Hildenbrand (Arm) <david@xxxxxxxxxx>
Cc: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Lorenzo Stoakes <ljs@xxxxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
Cc: Will Deacon <will@xxxxxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-mm@xxxxxxxxx

Anshuman Khandual (2):
arm64/mm: Move __check_safe_pte_update()
arm64/mm: Standardize printing for pgtable entries

arch/arm64/include/asm/pgtable.h | 49 ++++----------------------------
arch/arm64/mm/fault.c | 16 +++++++----
arch/arm64/mm/mmu.c | 48 +++++++++++++++++++++++++++++++
3 files changed, 64 insertions(+), 49 deletions(-)

--
2.43.0