diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/kernel/module.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index ee3c7dde8d9f..8d348c474a2f 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -23,17 +23,11 @@ | |||
23 | 23 | ||
24 | static void *module_map(unsigned long size) | 24 | static void *module_map(unsigned long size) |
25 | { | 25 | { |
26 | struct vm_struct *area; | 26 | if (PAGE_ALIGN(size) > MODULES_LEN) |
27 | |||
28 | size = PAGE_ALIGN(size); | ||
29 | if (!size || size > MODULES_LEN) | ||
30 | return NULL; | ||
31 | |||
32 | area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); | ||
33 | if (!area) | ||
34 | return NULL; | 27 | return NULL; |
35 | 28 | return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, | |
36 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL); | 29 | GFP_KERNEL, PAGE_KERNEL, -1, |
30 | __builtin_return_address(0)); | ||
37 | } | 31 | } |
38 | 32 | ||
39 | static char *dot2underscore(char *name) | 33 | static char *dot2underscore(char *name) |