Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59782099 authored by Qingqing Zhou's avatar Qingqing Zhou Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarQingqing Zhou <qqzhou@codeaurora.org>
parent fe4c25d0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2500,8 +2500,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)