summaryrefslogtreecommitdiff
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2021-05-18 12:53:30 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2021-06-07 12:56:18 +0100
commitf572f5cb3926fb436cf4f55c84685f2ff7425e57 (patch)
tree1c8ce36c75a77213c215add1335b6f5c8c2af743 /arch/arm/mm/mmu.c
parent4f706b078fd50a8eed9543a8d3fc64f1e840b7d2 (diff)
ARM: change vmalloc_min to vmalloc_start
Change the current vmalloc_min, which is supposed to be the lowest address of vmalloc space including the VMALLOC_OFFSET, to vmalloc_start which does not include VMALLOC_OFFSET. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Yanfei Xu <yanfei.xu@windriver.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 532b489a306c..a1d1a431340f 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1121,8 +1121,7 @@ void __init debug_ll_io_init(void)
}
#endif
-static unsigned long __initdata vmalloc_min =
- VMALLOC_END - (240 << 20) - VMALLOC_OFFSET;
+static unsigned long __initdata vmalloc_start = VMALLOC_END - (240 << 20);
/*
* vmalloc=size forces the vmalloc area to be exactly 'size'
@@ -1140,14 +1139,14 @@ static int __init early_vmalloc(char *arg)
vmalloc_reserve >> 20);
}
- vmalloc_max = VMALLOC_END - (PAGE_OFFSET + SZ_32M);
+ vmalloc_max = VMALLOC_END - (PAGE_OFFSET + SZ_32M + VMALLOC_OFFSET);
if (vmalloc_reserve > vmalloc_max) {
vmalloc_reserve = vmalloc_max;
pr_warn("vmalloc area is too big, limiting to %luMB\n",
vmalloc_reserve >> 20);
}
- vmalloc_min = VMALLOC_END - vmalloc_reserve;
+ vmalloc_start = VMALLOC_END - vmalloc_reserve;
return 0;
}
early_param("vmalloc", early_vmalloc);
@@ -1167,7 +1166,8 @@ void __init adjust_lowmem_bounds(void)
* and may itself be outside the valid range for which phys_addr_t
* and therefore __pa() is defined.
*/
- vmalloc_limit = (u64)vmalloc_min - PAGE_OFFSET + PHYS_OFFSET;
+ vmalloc_limit = (u64)vmalloc_start - VMALLOC_OFFSET -
+ PAGE_OFFSET + PHYS_OFFSET;
/*
* The first usable region must be PMD aligned. Mark its start