[PATCH 1/3] mm: change vm_get_page_prot() to accept vm_flags_t argument
Vlastimil Babka
vbabka at suse.cz
Thu Jun 19 21:31:50 AEST 2025
On 6/18/25 21:42, Lorenzo Stoakes wrote:
> We abstract the type of the VMA flags to vm_flags_t, however in may places
> it is simply assumed this is unsigned long, which is simply incorrect.
>
> At the moment this is simply an incongruity, however in future we plan to
> change this type and therefore this change is a critical requirement for
> doing so.
>
> Overall, this patch does not introduce any functional change.
>
> Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes at oracle.com>
> diff --git a/arch/powerpc/include/asm/book3s/64/pkeys.h b/arch/powerpc/include/asm/book3s/64/pkeys.h
> index 5b178139f3c0..6f2075636591 100644
> --- a/arch/powerpc/include/asm/book3s/64/pkeys.h
> +++ b/arch/powerpc/include/asm/book3s/64/pkeys.h
> @@ -4,8 +4,9 @@
> #define _ASM_POWERPC_BOOK3S_64_PKEYS_H
>
> #include <asm/book3s/64/hash-pkey.h>
> +#include <linux/mm_types.h>
Hopefully not causing a circular header include.
> -static inline u64 vmflag_to_pte_pkey_bits(u64 vm_flags)
> +static inline u64 vmflag_to_pte_pkey_bits(vm_flags_t vm_flags)
Is this change rather for patch 3? It's not changing vm_get_page_prot().
OTOH git grep shows me you missed:
arch/powerpc/mm/book3s64/pgtable.c:pgprot_t vm_get_page_prot(unsigned long
vm_flags)
With that sorted out, feel free to add:
Reviewed-by: Vlastimil Babka <vbabka at suse.cz>
Thanks!
More information about the Linuxppc-dev
mailing list