Commit df8e4c7d authored by Chen Gang's avatar Chen Gang Committed by Guan Xuetao

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: "d0a21265 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: default avatarChen Gang <gang.chen.5i5j@gmail.com>
Acked-by: default avatarXuetao Guan <gxt@mprc.pku.edu.cn>
Signed-off-by: default avatarXuetao Guan <gxt@mprc.pku.edu.cn>
parent 4877b60c
...@@ -24,14 +24,9 @@ ...@@ -24,14 +24,9 @@
void *module_alloc(unsigned long size) void *module_alloc(unsigned long size)
{ {
struct vm_struct *area; return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
GFP_KERNEL, PAGE_KERNEL_EXEC, NUMA_NO_NODE,
size = PAGE_ALIGN(size); __builtin_return_address(0));
area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END);
if (!area)
return NULL;
return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
} }
int int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment