blob: 9e074ec36e3e1f8fa320a3bb6a6084049b2680e1 [file] [log] [blame]
From: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Subject: mm: fixup vma.h for nommu
Date: Sun, 25 Aug 2024 12:29:47 +0100
Some series of includes result in vma.h being imported by nommu under
certain circumstances, which references FIRST_USER_ADDRESS and
USER_PGTABLES_CEILING, neither of which are necessarily defined in a nommu
scenario.
Work around this by wrapping the inline function which references these
(init_vma_munmap()) in an #ifdef CONFIG_MMU.
Link: https://lkml.kernel.org/r/7d0ea994-f750-49c5-b392-ae7117369cf3@lucifer.local
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Reported-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/vma.h | 2 ++
1 file changed, 2 insertions(+)
--- a/mm/vma.h~mm-remove-duplicated-include-in-vma_internalh-fix
+++ a/mm/vma.h
@@ -225,6 +225,7 @@ static inline int vma_iter_store_gfp(str
}
+#ifdef CONFIG_MMU
/*
* These three helpers classifies VMAs for virtual memory accounting.
*/
@@ -255,6 +256,7 @@ static inline bool is_data_mapping(vm_fl
{
return (flags & (VM_WRITE | VM_SHARED | VM_STACK)) == VM_WRITE;
}
+#endif
static inline void vma_iter_config(struct vma_iterator *vmi,
_