OSDN Git Service

ARM: mm: Adjust the low memory boundary
authorSusheel Khiani <skhiani@codeaurora.org>
Fri, 4 Sep 2015 14:12:18 +0000 (19:42 +0530)
committerKyle Yan <kyan@codeaurora.org>
Wed, 29 Jun 2016 22:00:52 +0000 (15:00 -0700)
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: Neeti Desai <neetid@codeaurora.org>
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
arch/arm/mm/mmu.c

index 14bb5ac..fd7b4dd 100644 (file)
@@ -1116,6 +1116,19 @@ void __init sanity_check_meminfo(void)
        struct memblock_region *reg;
        bool should_use_highmem = false;
 
+#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;