Re: [PATCH 1/3] mm: change vm_get_page_prot() to accept vm_flags_t argument

From
Vlastimil Babka <hidden>
Date
2025-06-19 11:31:58
Also in
kvm, linux-fsdevel, linux-mm, linux-trace-kernel, lkml, nvdimm, sparclinux
Reply to
Lorenzo Stoakes, 2025-06-18
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 <redacted>
quoted hunk ↗ jump to hunk
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 <redacted>

Thanks!
Thread (48 messages) 48 messages, 16 authors, last reply 2025-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help