aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/module.c')
-rw-r--r--arch/s390/kernel/module.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c
index 46412b1d7e1e..4610deafd953 100644
--- a/arch/s390/kernel/module.c
+++ b/arch/s390/kernel/module.c
@@ -44,6 +44,17 @@
44#define PLT_ENTRY_SIZE 20 44#define PLT_ENTRY_SIZE 20
45#endif /* CONFIG_64BIT */ 45#endif /* CONFIG_64BIT */
46 46
47#ifdef CONFIG_64BIT
48void *module_alloc(unsigned long size)
49{
50 if (PAGE_ALIGN(size) > MODULES_LEN)
51 return NULL;
52 return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
53 GFP_KERNEL, PAGE_KERNEL, -1,
54 __builtin_return_address(0));
55}
56#endif
57
47/* Free memory returned from module_alloc */ 58/* Free memory returned from module_alloc */
48void module_free(struct module *mod, void *module_region) 59void module_free(struct module *mod, void *module_region)
49{ 60{