Re: [PATCH V2] mm: Standardize printing for pgtable entries
From: David Hildenbrand (Arm)
Date: Wed Jul 08 2026 - 09:01:35 EST
On 7/8/26 14:43, Ryan Roberts wrote:
> On 08/07/2026 12:27, David Hildenbrand (Arm) wrote:
>> On 7/8/26 13:22, Ryan Roberts wrote:
>>>
>>> Not sure if it's worth doing something like this?:
>>>
>>> #define PTVAL_STR_MAX \
>>> (MAX(MAX(MAX(MAX(sizeof(pteval_t), sizeof(pmdval_t)), \
>>> sizeof(pudval_t)), \
>>> sizeof(p4dval_t)), \
>>> sizeof(pgdval_t)) + 1)
>>>
>>> Would probably save stack space for 32bit arches?
>>
>> Do we really care about that? This is about a corner cases error reporting right
>> now.
>
> Fair enough, it just seemed like an obvious and simple (very minor) improvement.
>
>>
>>>
>>>
>>> I think arm64 code also does pte printing, which you also need to fix up for
>>> D128 support. Perhaps this could be moved to a header for reuse?
>>
>> We could do that as a second step, right?
>
> Sure, but why churn it twice? Anyway, no strong opinion, you're the boss :)
I'd say, if we're going to reuse this code for the arm64 pieces as well, we'd
best send it along the arm64 pieces, and figure out where to place it for
arm64's use right away.
If we'll defer the arm64 changes, I'd also defer deciding where we'd be moving
it to.
--
Cheers,
David