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

Anshuman Khandual posted 2 patches 1 week, 2 days ago
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(-)
[PATCH V3 0/2] arm64/mm: Standardize printing for pgtable entries
Posted by Anshuman Khandual 1 week, 2 days ago
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@arm.com/

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

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

Changes in V3:

- Added tags from David
- Added comments in section closure for CONFIG_DEBUG_VM block

Changes in V2:

https://lore.kernel.org/all/20260909040005.4148136-1-anshuman.khandual@arm.com/

- 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@arm.com/

Cc: David Hildenbrand (Arm) <david@kernel.org>
Cc: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org

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
Re: [PATCH V3 0/2] arm64/mm: Standardize printing for pgtable entries
Posted by Catalin Marinas 19 hours ago
On Wed, Sep 16, 2026 at 10:19:31AM +0530, Anshuman Khandual wrote:
> 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@arm.com/
> 
> This series applies on v7.3-rc3 but after the following.
> 
> https://lore.kernel.org/linux-mm/20260831054331.625505-1-anshuman.khandual@arm.com/

I think this one was queued by Andrew, so I can't take these two patches
via the arm64 tree. I'm fine with Andrew picking them up as long as
there are no serious conflicts (I just started queuing stuff for arm64,
so can't tell for sure).

For this series,

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>