Commit f572f5cb authored by Russell King (Oracle)'s avatar Russell King (Oracle)

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: default avatarYanfei Xu <yanfei.xu@windriver.com>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent 4f706b07
...@@ -1121,8 +1121,7 @@ void __init debug_ll_io_init(void) ...@@ -1121,8 +1121,7 @@ void __init debug_ll_io_init(void)
} }
#endif #endif
static unsigned long __initdata vmalloc_min = static unsigned long __initdata vmalloc_start = VMALLOC_END - (240 << 20);
VMALLOC_END - (240 << 20) - VMALLOC_OFFSET;
/* /*
* vmalloc=size forces the vmalloc area to be exactly 'size' * vmalloc=size forces the vmalloc area to be exactly 'size'
...@@ -1140,14 +1139,14 @@ static int __init early_vmalloc(char *arg) ...@@ -1140,14 +1139,14 @@ static int __init early_vmalloc(char *arg)
vmalloc_reserve >> 20); 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) { if (vmalloc_reserve > vmalloc_max) {
vmalloc_reserve = vmalloc_max; vmalloc_reserve = vmalloc_max;
pr_warn("vmalloc area is too big, limiting to %luMB\n", pr_warn("vmalloc area is too big, limiting to %luMB\n",
vmalloc_reserve >> 20); vmalloc_reserve >> 20);
} }
vmalloc_min = VMALLOC_END - vmalloc_reserve; vmalloc_start = VMALLOC_END - vmalloc_reserve;
return 0; return 0;
} }
early_param("vmalloc", early_vmalloc); early_param("vmalloc", early_vmalloc);
...@@ -1167,7 +1166,8 @@ void __init adjust_lowmem_bounds(void) ...@@ -1167,7 +1166,8 @@ void __init adjust_lowmem_bounds(void)
* and may itself be outside the valid range for which phys_addr_t * and may itself be outside the valid range for which phys_addr_t
* and therefore __pa() is defined. * 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 * The first usable region must be PMD aligned. Mark its start
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment