[PATCH] arm64/mm: Define PTE_SHIFT
Ard Biesheuvel
ardb at kernel.org
Fri Mar 7 03:16:34 PST 2025
On Fri, 7 Mar 2025 at 10:21, Anshuman Khandual
<anshuman.khandual at arm.com> wrote:
>
>
>
> On 3/7/25 14:37, Ryan Roberts wrote:
> > On 07/03/2025 05:08, Anshuman Khandual wrote:
> >> Address bytes shifted with a single 64 bit page table entry (any page table
> >> level) has been always hard coded as 3 (aka 2^3 = 8). Although intuitive it
> >> is not very readable or easy to reason about. Besides it is going to change
> >> with D128, where each 128 bit page table entry will shift address bytes by
> >> 4 (aka 2^4 = 16) instead.
> >>
> >> Let's just formalise this address bytes shift value into a new macro called
> >> PTE_SHIFT establishing a logical abstraction, thus improving readability as
> >> well. This does not cause any functional change.
> >>
> >> Cc: Catalin Marinas <catalin.marinas at arm.com>
> >> Cc: Will Deacon <will at kernel.org>
> >> Cc: Mark Rutland <mark.rutland at arm.com>
> >> Cc: Andrey Ryabinin <ryabinin.a.a at gmail.com>
> >> Cc: Alexander Potapenko <glider at google.com>
> >> Cc: Andrey Konovalov <andreyknvl at gmail.com>
> >> Cc: Dmitry Vyukov <dvyukov at google.com>
> >> Cc: Ard Biesheuvel <ardb at kernel.org>
> >> Cc: Ryan Roberts <ryan.roberts at arm.com>
> >> Cc: linux-arm-kernel at lists.infradead.org
> >> Cc: linux-kernel at vger.kernel.org
> >> Cc: kasan-dev at googlegroups.com
> >> Signed-off-by: Anshuman Khandual <anshuman.khandual at arm.com>
> >
> >
> > +1 for PTDESC_ORDER
>
> Alright.
>
Agreed.
> >
> > Implementation looks good to me so:
> >
> > Reviewed-by: Ryan Roberts <ryan.roberts at arm.com>
>
With PTDESC_ORDER used throughout,
Acked-by: Ard Biesheuvel <ardb at kernel.org>
More information about the linux-arm-kernel
mailing list