Re: [PATCH V3] mm: Standardize printing for pgtable entries

From: David Hildenbrand (Arm)

Date: Mon Jul 13 2026 - 08:32:10 EST


On 7/13/26 13:36, Andy Shevchenko wrote:
> On Mon, Jul 13, 2026 at 11:30:08AM +0200, David Hildenbrand (Arm) wrote:
>> On 7/13/26 04:37, Anshuman Khandual wrote:
>
> ...
>
>>>
>>> %*phN dumps raw memory bytes and will have different formats on little
>>> vs big endian platforms which is not desired here. Debug print here is
>>> expected to report pgtable entry canonical value where various platform
>>> specific fields can be inspected.
>>
>> If we'd want to go that route I guess we'd have to add a new specifier that will
>> print the pointed number in the size specified by the second argument. We could
>> start by supporting 8/16/32/64/128 bit only, no weird stuff in between.
>
> FWIW, we have hex_dump_to_buffer() for that already.
>

Right,

@groupsize: number of bytes to print at a time (1, 2, 4, 8; default = 1)

Does the trick and would have to be extended to 16 if we'd want to print 128bit
pte values in the future.

--
Cheers,

David