Re: [PATCH v3 3/9] mm: use hw_pte_t for generic PTE table storage
From: David Hildenbrand (Arm)
Date: Thu Oct 01 2026 - 07:31:32 EST
On 9/22/26 19:12, Muhammad Usama Anjum wrote:
> Generic page-table interfaces use pte_t * for both pointers to PTE table
> storage and pointers to software PTE values. Convert the generic
> declarations and their MM, fs, and kernel users together so parameters,
> return types, callbacks, and local pointers that designate table storage
> use hw_pte_t *.
>
> Include linux/pgtable_types.h from headers that expose the converted
> interfaces. It continues to provide pgprot_t to vmalloc.h through
> asm/page.h.
>
> Keep software PTE values as pte_t and retain pte_t * for value interfaces.
>
> No architecture selects ARCH_HAS_HW_PTE_T at this point, so hw_pte_t
> remains an alias of pte_t and this changes the interface vocabulary without
> changing representation or behavior.
>
> Most of this mechanical conversion was generated with the Coccinelle script
> included in the cover letter. The script deliberately ignores pte_t *
> pointers named ptentp because they designate software PTE values. The
> result was then audited, and sites the script could not convert were
> updated by hand.
>
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@xxxxxxx>
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David