mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
mm/vmalloc.c: increase vm area range in __vmalloc_node
When the CONFIG_ENABLE_VMALLOC_SAVING is enabled, even though the unused lowmem is used as vmalloc space, but __vmalloc_node() still uses VMALLOC_START as the start point to allocate vm area, but the range [VMALLOC_START, VMALLOC_END] is limited, this may cause vmalloc allocation failure. Change the start point to allocate the vm area from VMALLOC_START to PAGE_OFFSET to make that allocation can be chosen from [PAGE_OFFSET, VMALLOC_START) also. Change-Id: I89c099484846c4bcd9b607c1925f253c165d0dd9 Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
This commit is contained in:
parent
644acac772
commit
b588978a22
1 changed files with 5 additions and 0 deletions
|
|
@ -2631,8 +2631,13 @@ static void *__vmalloc_node(unsigned long size, unsigned long align,
|
|||
gfp_t gfp_mask, pgprot_t prot,
|
||||
int node, const void *caller)
|
||||
{
|
||||
#ifdef CONFIG_ENABLE_VMALLOC_SAVING
|
||||
return __vmalloc_node_range(size, align, PAGE_OFFSET, VMALLOC_END,
|
||||
gfp_mask, prot, 0, node, caller);
|
||||
#else
|
||||
return __vmalloc_node_range(size, align, VMALLOC_START, VMALLOC_END,
|
||||
gfp_mask, prot, 0, node, caller);
|
||||
#endif
|
||||
}
|
||||
|
||||
void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot)
|
||||
|
|
|
|||
Loading…
Reference in a new issue