Re: [PATCH V2 05/14] arm64/mm: Override read-write accessors for vm_page_prot
From: Anshuman Khandual
Date: Thu Sep 17 2026 - 00:15:24 EST
On Wed, Sep 16, 2026 at 03:39:31PM +0200, David Hildenbrand (Arm) wrote:
> On 9/7/26 05:50, Anshuman Khandual wrote:
> > Override pgprot_[read|write]() accessors using ptval_[get|set]() providing
> > required single copy atomic operation for vma->vm_page_prot.
> >
> > Cc: Catalin Marinas <catalin.marinas@xxxxxxx>
> > Cc: Will Deacon <will@xxxxxxxxxx>
> > Cc: Ryan Roberts <ryan.roberts@xxxxxxx>
> > Cc: Mark Rutland <mark.rutland@xxxxxxx>
> > Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> > Cc: linux-kernel@xxxxxxxxxxxxxxx
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@xxxxxxx>
> > ---
> > arch/arm64/include/asm/pgtable.h | 12 ++++++++++++
> > 1 file changed, 12 insertions(+)
> >
> > diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
> > index 66bf5bbe484e..2b457db19be0 100644
> > --- a/arch/arm64/include/asm/pgtable.h
> > +++ b/arch/arm64/include/asm/pgtable.h
> > @@ -122,6 +122,18 @@ static inline pgd_t pgdp_get(pgd_t *pgdp)
> > return ptval_get(*pgdp);
> > }
> >
> > +#define pgprot_read pgprot_read
> > +static inline pgprot_t pgprot_read(pgprot_t *prot)
> > +{
> > + return ptval_get(*prot);
> > +}
>
> Similarly a const pointer here.
OK - will change.
>
> Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
>
> --
> Cheers,
>
> David