[PATCH] alloc_tag: hide execmem_vmap() on !MMU

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Arnd Bergmann <arnd@xxxxxxxx>

The newly added function fails to link on nommu kernels, but is also
not needed there:

ld.lld-20: error: undefined symbol: __get_vm_area_node
>>> referenced by execmem.c
>>>               mm/execmem.o:(execmem_vmap) in archive vmlinux.a
>>> referenced by execmem.c
>>>               mm/execmem.o:(execmem_vmap) in archive vmlinux.a

Fixes: 57bc3834fb6f ("alloc_tag: populate memory for module tags as needed")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
 mm/execmem.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/execmem.c b/mm/execmem.c
index 5c0f9f2d6f83..b04cfece7356 100644
--- a/mm/execmem.c
+++ b/mm/execmem.c
@@ -368,6 +368,7 @@ void execmem_free(void *ptr)
 		vfree(ptr);
 }
 
+#ifdef CONFIG_MMU
 struct vm_struct *execmem_vmap(size_t size)
 {
 	struct execmem_range *range = &execmem_info->ranges[EXECMEM_MODULE_DATA];
@@ -383,6 +384,7 @@ struct vm_struct *execmem_vmap(size_t size)
 
 	return area;
 }
+#endif
 
 void *execmem_update_copy(void *dst, const void *src, size_t size)
 {
-- 
2.39.5





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux