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

Commit 51251003 authored by Susheel Khiani's avatar Susheel Khiani Committed by Charan Teja Reddy
Browse files

msm: Adjust the low memory boundary



The unused virtual address space in low memory is given to
vmalloc for use. This reduces the low memory space and
increases vmalloc space. Adjust the vmalloc_min in order
to increase the low memory.

Change-Id: I0dbef5b6e5ec3d19f5f93f06ed03a4cf1215dc4d
Signed-off-by: default avatarNeeti Desai <neetid@codeaurora.org>
Signed-off-by: default avatarSusheel Khiani <skhiani@codeaurora.org>
parent d0bd1992
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1168,6 +1168,19 @@ void __init adjust_lowmem_bounds(void)
	 */
	vmalloc_limit = (u64)(uintptr_t)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;

#ifdef CONFIG_ENABLE_VMALLOC_SAVING
	struct memblock_region *prev_reg = NULL;

	for_each_memblock(memory, reg) {
		if (prev_reg == NULL) {
			prev_reg = reg;
			continue;
		}
		vmalloc_limit += reg->base - (prev_reg->base + prev_reg->size);
		prev_reg = reg;
	}
#endif

	for_each_memblock(memory, reg) {
		phys_addr_t block_start = reg->base;
		phys_addr_t block_end = reg->base + reg->size;