Re: [RFC V1 12/16] arm64/mm: Abstract printing of pxd_val()

Anshuman Khandual
2026-04-10T04:05:32Z

On 08/04/26 5:58 PM, David Hildenbrand (Arm) wrote:
> On 2/24/26 06:11, Anshuman Khandual wrote:
>
> Subject: you probably mean "pxx_val()" ?

Yes - sounds better will change.

>
>> 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().
>>
>> Cc: Catalin Marinas <catalin.marinas@arm.com>
>> Cc: Will Deacon <will@kernel.org>
>> Cc: Ryan Roberts <ryan.roberts@arm.com>
>> Cc: Mark Rutland <mark.rutland@arm.com>
>> Cc: linux-arm-kernel@lists.infradead.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
>> ---
>> arch/arm64/include/asm/pgtable-types.h | 3 +++
>> arch/arm64/include/asm/pgtable.h | 22 +++++++++++-----------
>> arch/arm64/mm/fault.c | 10 +++++-----
>> 3 files changed, 19 insertions(+), 16 deletions(-)
>>
>> diff --git a/arch/arm64/include/asm/pgtable-types.h b/arch/arm64/include/asm/pgtable-types.h
>> index 265e8301d7ba..dc3791dc9f14 100644
>> --- a/arch/arm64/include/asm/pgtable-types.h
>> +++ b/arch/arm64/include/asm/pgtable-types.h
>> @@ -11,6 +11,9 @@
>>
>> #include <asm/types.h>
>>
>> +#define __PRIpte "016llx"
>> +#define __PRIpte_args(val) ((u64)val)
>
> Same comment regarding "pte" being misleading.

Sure - will rename __PRIpte as PRIpxx instead.

>
>