diff options
author | Chen Gang <gang.chen.5i5j@gmail.com> | 2014-03-13 20:49:27 -0400 |
---|---|---|
committer | Guan Xuetao <gxt@mprc.pku.edu.cn> | 2014-06-19 20:22:37 -0400 |
commit | df8e4c7d8d756d93da676b532c39f8d1d9ceab77 (patch) | |
tree | 75b7e7f11d4e03f8bdea9fb04a3b8bec4d34e36e /arch | |
parent | 4877b60cdf3f32281af0a241c7514167e1a0cd01 (diff) |
arch/unicore32/kernel/module.c: use __vmalloc_node_range() instead of __vmalloc_area()
__vmalloc_area() has already been removed from upstream kernel, need
use __vmalloc_node_range() instead of.
The related commit: "d0a2126 mm: unify module_alloc code for vmalloc".
The related error (allmodconfig for unicore32):
CC arch/unicore32/kernel/module.o
arch/unicore32/kernel/module.c: In function 'module_alloc' :
arch/unicore32/kernel/module.c:34: error: implicit declaration of function '__vmalloc_area'
arch/unicore32/kernel/module.c:34: warning: return makes pointer from integer without a cast
make[1]: *** [arch/unicore32/kernel/module.o] Error 1
make: *** [arch/unicore32/kernel] Error 2
Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
Signed-off-by: Xuetao Guan <gxt@mprc.pku.edu.cn>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/unicore32/kernel/module.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/unicore32/kernel/module.c b/arch/unicore32/kernel/module.c index 16bd1495b934..dc41f6dfedb6 100644 --- a/arch/unicore32/kernel/module.c +++ b/arch/unicore32/kernel/module.c | |||
@@ -24,14 +24,9 @@ | |||
24 | 24 | ||
25 | void *module_alloc(unsigned long size) | 25 | void *module_alloc(unsigned long size) |
26 | { | 26 | { |
27 | struct vm_struct *area; | 27 | return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END, |
28 | 28 | GFP_KERNEL, PAGE_KERNEL_EXEC, NUMA_NO_NODE, | |
29 | size = PAGE_ALIGN(size); | 29 | __builtin_return_address(0)); |
30 | area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END); | ||
31 | if (!area) | ||
32 | return NULL; | ||
33 | |||
34 | return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC); | ||
35 | } | 30 | } |
36 | 31 | ||
37 | int | 32 | int |