[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 06/13] mm/vma: convert vm_pgprot_modify() to use vma_flags_t and rename
- To: Lance Yang <lance.yang@xxxxxxxxx>
- From: Lorenzo Stoakes <ljs@xxxxxxxxxx>
- Date: Thu, 2 Jul 2026 16:29:20 +0100
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=k20260515 header.d=kernel.org header.i="@kernel.org" header.h="Date:From:To:Cc:Subject:References:In-Reply-To"
- Cc: akpm@xxxxxxxxxxxxxxxxxxxx, tsbogend@xxxxxxxxxxxxxxxx, maddy@xxxxxxxxxxxxx, mpe@xxxxxxxxxxxxxx, maarten.lankhorst@xxxxxxxxxxxxxxx, mripard@xxxxxxxxxx, tzimmermann@xxxxxxx, airlied@xxxxxxxxx, simona@xxxxxxxx, l.stach@xxxxxxxxxxxxxx, inki.dae@xxxxxxxxxxx, sw0312.kim@xxxxxxxxxxx, kyungmin.park@xxxxxxxxxxx, krzk@xxxxxxxxxx, peter.griffin@xxxxxxxxxx, jani.nikula@xxxxxxxxxxxxxxx, joonas.lahtinen@xxxxxxxxxxxxxxx, rodrigo.vivi@xxxxxxxxx, tursulin@xxxxxxxxxxx, robin.clark@xxxxxxxxxxxxxxxx, lumag@xxxxxxxxxx, lyude@xxxxxxxxxx, dakr@xxxxxxxxxx, tomi.valkeinen@xxxxxxxxxxxxxxxx, hjc@xxxxxxxxxxxxxx, heiko@xxxxxxxxx, andy.yan@xxxxxxxxxxxxxx, thierry.reding@xxxxxxxxxx, mperttunen@xxxxxxxxxx, jonathanh@xxxxxxxxxx, kraxel@xxxxxxxxxx, dmitry.osipenko@xxxxxxxxxxxxx, zack.rusin@xxxxxxxxxxxx, matthew.brost@xxxxxxxxx, thomas.hellstrom@xxxxxxxxxxxxxxx, oleksandr_andrushchenko@xxxxxxxx, deller@xxxxxx, bcrl@xxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, brauner@xxxxxxxxxx, muchun.song@xxxxxxxxx, osalvador@xxxxxxx, david@xxxxxxxxxx, ziy@xxxxxxxxxx, baolin.wang@xxxxxxxxxxxxxxxxx, liam@xxxxxxxxxxxxx, npache@xxxxxxxxxx, ryan.roberts@xxxxxxx, dev.jain@xxxxxxx, baohua@xxxxxxxxxx, hughd@xxxxxxxxxx, vbabka@xxxxxxxxxx, rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, jannh@xxxxxxxxxx, pfalcato@xxxxxxx, kees@xxxxxxxxxx, perex@xxxxxxxx, tiwai@xxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, etnaviv@xxxxxxxxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx, freedreno@xxxxxxxxxxxxxxxxxxxxx, nouveau@xxxxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, virtualization@xxxxxxxxxxxxxxx, intel-xe@xxxxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, linux-aio@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, linux-sound@xxxxxxxxxxxxxxx
- Delivery-date: Thu, 02 Jul 2026 15:29:51 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Jul 02, 2026 at 08:21:16PM +0800, Lance Yang wrote:
>
> On Mon, Jun 29, 2026 at 08:25:29PM +0100, Lorenzo Stoakes wrote:
> >Update vm_pgprot_modify() to use the new VMA flags type vma_flags_t, and
> >rename to vma_pgprot_modify() accordingly.
> >
> >This is part of the ongoing work to convert vm_flags_t to vma_flags_t, in
> >order to eliminate the arbitrary limit of the number of bits in a system
> >word on available VMA flags.
> >
> >Update VMA userland tests accordingly, updating vma_set_page_prot() to no
> >longer inline vma_pgprot_modify(), rather we can simply define
> >vma_pgprot_modify() as a static inline function and the tests will pick it
> >up from vma.h.
> >
> >No functional change intended.
> >
> >Signed-off-by: Lorenzo Stoakes <ljs@xxxxxxxxxx>
> >---
> [...]
> >diff --git a/mm/vma.h b/mm/vma.h
> >index bcf0c2773449..6a8abb8ae937 100644
> >--- a/mm/vma.h
> >+++ b/mm/vma.h
> >@@ -522,9 +522,11 @@ static inline bool
> >vma_wants_manual_pte_write_upgrade(struct vm_area_struct *vma
> > }
> >
> > #ifdef CONFIG_MMU
> >-static inline pgprot_t vm_pgprot_modify(pgprot_t oldprot, vm_flags_t
> >vm_flags)
> >+static inline pgprot_t vma_pgprot_modify(pgprot_t oldprot, vma_flags_t
> >vma_flags)
> > {
> >- return pgprot_modify(oldprot, vm_get_page_prot(vm_flags));
> >+ const pgprot_t prot = vma_get_page_prot(vma_flags);
> >+
> >+ return pgprot_modify(oldprot, prot);
>
> Nit: could this just stay as a single return? something like:
>
> return pgprot_modify(oldprot, vma_get_page_prot(vma_flags));
I feel it's a bit clearer this way, separating out the two, I know it's a super
tiny difference but anyway :P
>
> Otherwise, LGTM, feel free to add:
>
> Reviewed-by: Lance Yang <lance.yang@xxxxxxxxx>
Thanks!
>
> [...]
Cheers, Lorenzo
|