diff options
author | Cyril Chemparathy <cyril@ti.com> | 2012-09-21 11:56:14 -0400 |
---|---|---|
committer | Tushar Behera <tushar.behera@linaro.org> | 2013-03-21 17:58:12 +0530 |
commit | 109ee72e99b899b0c4e459863c485b519b937f3a (patch) | |
tree | f8ed0a370257c91c8565a9a30254cbf3d928c350 | |
parent | 4430b531a33e9642676bd6c65cbb1855a03af6b2 (diff) |
ARM: mm: cleanup checks for membank overlap with vmalloc area
On Keystone platforms, physical memory is entirely outside the 32-bit
addressible range. Therefore, the (bank->start > ULONG_MAX) check below marks
the entire system memory as highmem, and this causes unpleasentness all over.
This patch eliminates the extra bank start check (against ULONG_MAX) by
checking bank->start against the physical address corresponding to vmalloc_min
instead.
In the process, this patch also cleans up parts of the highmem sanity check
code by removing what has now become a redundant check for banks that entirely
overlap with the vmalloc range.
Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
-rw-r--r-- | arch/arm/mm/mmu.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 961fd33acd04..c831963c83c4 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -1026,15 +1026,12 @@ void __init sanity_check_meminfo(void) } #endif - if (bank->start > ULONG_MAX) - highmem = 1; - -#ifdef CONFIG_HIGHMEM if (bank->start >= vmalloc_limit) highmem = 1; bank->highmem = highmem; +#ifdef CONFIG_HIGHMEM /* * Split those memory banks which are partially overlapping * the vmalloc area greatly simplifying things later. @@ -1057,8 +1054,6 @@ void __init sanity_check_meminfo(void) bank->size = vmalloc_limit - bank->start; } #else - bank->highmem = highmem; - /* * Highmem banks not allowed with !CONFIG_HIGHMEM. */ @@ -1071,18 +1066,6 @@ void __init sanity_check_meminfo(void) } /* - * Check whether this memory bank would entirely overlap - * the vmalloc area. - */ - if (bank->start >= vmalloc_limit) { - printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx " - "(vmalloc region overlap).\n", - (unsigned long long)bank->start, - (unsigned long long)bank->start + bank->size - 1); - continue; - } - - /* * Check whether this memory bank would partially overlap * the vmalloc area. */ |