lkml.org 
[lkml]   [2014]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject回复: [PATCH] arch/unicore 32/kernel/module.c: use vmalloc node range() instead of vmalloc area()
Thanks Chen.

Cc: Zhichuang Sun <sunzhichuang@mprc.pku.edu.cn>
Tested-by: Zhichuang Sun <sunzhichuang@mprc.pku.edu.cn>
Acked-by: Xuetao Guan <gxt@pku.edu.cn>


----- Chen Gang <gang.chen.5i5j@gmail.com> 写道:
> __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>
> ---
> arch/unicore32/kernel/module.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/arch/unicore32/kernel/module.c b/arch/unicore32/kernel/module.c
> index 16bd149..dc41f6d 100644
> --- a/arch/unicore32/kernel/module.c
> +++ b/arch/unicore32/kernel/module.c
> @@ -24,14 +24,9 @@
>
> void *module_alloc(unsigned long size)
> {
> - struct vm_struct *area;
> -
> - size = PAGE_ALIGN(size);
> - area = __get_vm_area(size, VM_ALLOC, MODULES_VADDR, MODULES_END);
> - if (!area)
> - return NULL;
> -
> - return __vmalloc_area(area, GFP_KERNEL, PAGE_KERNEL_EXEC);
> + return __vmalloc_node_range(size, 1, MODULES_VADDR, MODULES_END,
> + GFP_KERNEL, PAGE_KERNEL_EXEC, NUMA_NO_NODE,
> + __builtin_return_address(0));
> }
>
> int
> --
> 1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-03-22 09:01    [W:0.071 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site