Re: [PATCH RFC v3 12/21] mm/pgtable: redefine PGTABLE_LEVEL enum with ascend order from PGD

From: David Hildenbrand (Arm)

Date: Thu Sep 10 2026 - 07:06:23 EST


On 9/2/26 13:56, Yeoreum Yun wrote:
> The PGTABLE_LEVEL enum values appear to be ordered in the opposite direction
> from their intended usage.
>
> Intuitively, higher page table levels should have smaller enum values,
> but PTE is currently assigned 0.
>
> For consistency and cleanup, reverse the enum value ordering.
>
> Since there is no current user relies on these numbers to be ascending from
> PTE->PGD, so it can be changed to be ascending from PGD->PTE, in the
> direction of the page table walk.
>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@xxxxxxx>
> ---

Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David