[PATCH 0/6] arm64: distinguish HW PTE pointers from SW PTE value pointers
Muhammad Usama Anjum
usama.anjum at arm.com
Mon Sep 21 03:10:18 PDT 2026
On 21/09/2026 10:51 am, Ryan Roberts wrote:
> On 14/09/2026 14:51, Muhammad Usama Anjum wrote:
>> Hi,
>>
>> The generic series introduces hw_pte_t for HW PTEs, while SW PTE values
>> use pte_t. This series enables the distinct type on arm64 so the
>> compiler can distinguish HW PTE pointers (hw_pte_t *) from SW PTE value
>> pointers (pte_t *).
>>
>> The conversion updates HW PTE pointers and accessors, including atomic
>> updates, fixmap, and early page-table construction, before selecting
>> ARCH_HAS_HW_PTE_T. Higher-level entry types remain out of scope, and
>> shared helpers retain explicit casts.
>>
>> The linked generic series is a prerequisite. Its cover contains the
>> Coccinelle script used for most pointer conversions; the remaining sites
>> were converted by hand.
>>
>> Link: https://lore.kernel.org/all/20260903103002.1091859-1-usama.anjum@arm.com/
>> Signed-off-by: Muhammad Usama Anjum <usama.anjum at arm.com>
>
> I've been through this as best I can and provided some minor comments. This all
> looks ok over all. But given the number of small changes, it would probably be
> wise to go big on testing; what level of testing has been performed? I'd suggest
> mm selftests (with all the magic to make all the tests actually run) at minimum
> and all the fastpath benchmarks as a stress test.
Sorry, it wasn't mentioned in cover letter. But mm selftests were run. I'll run
fastpath benchmarks as well and mention clearly.
>
> I think it's quite ugly (and adds a bit to the cognitive load) to have this
> intermediate state where only ptes are converted. But I understand the need to
> do this incrementally. Hopefully you can follow up with the other levels soon :)
Yeah, I would have loved to do everything all at once. But it would have 10 times
more complex. I'll proceed to PMD after this series which would have most complex
conversions. Converting other PXX would be straight forward after that.
...
--
Thanks,
Usama
More information about the linux-arm-kernel
mailing list