aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorCyril Chemparathy <cyril@ti.com>2012-07-20 12:24:45 -0400
committerWill Deacon <will.deacon@arm.com>2013-05-30 11:02:26 -0400
commitadf2e9fda34c1cfff2ee4e47078b1e142adb2c30 (patch)
treef9c448396ef1e774d27e75f684a2d4687d4cd6ee /arch/arm/mm/mmu.c
parent5b20c5b2f014ecc0a6310988af69cd7ede9e7c67 (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> Tested-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Tested-by: Subash Patel <subash.rp@samsung.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index fc6ff1a9db50..ae249d1ab1d3 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -994,15 +994,12 @@ void __init sanity_check_meminfo(void)
994 struct membank *bank = &meminfo.bank[j]; 994 struct membank *bank = &meminfo.bank[j];
995 *bank = meminfo.bank[i]; 995 *bank = meminfo.bank[i];
996 996
997 if (bank->start > ULONG_MAX)
998 highmem = 1;
999
1000#ifdef CONFIG_HIGHMEM
1001 if (bank->start >= vmalloc_limit) 997 if (bank->start >= vmalloc_limit)
1002 highmem = 1; 998 highmem = 1;
1003 999
1004 bank->highmem = highmem; 1000 bank->highmem = highmem;
1005 1001
1002#ifdef CONFIG_HIGHMEM
1006 /* 1003 /*
1007 * Split those memory banks which are partially overlapping 1004 * Split those memory banks which are partially overlapping
1008 * the vmalloc area greatly simplifying things later. 1005 * the vmalloc area greatly simplifying things later.
@@ -1025,8 +1022,6 @@ void __init sanity_check_meminfo(void)
1025 bank->size = vmalloc_limit - bank->start; 1022 bank->size = vmalloc_limit - bank->start;
1026 } 1023 }
1027#else 1024#else
1028 bank->highmem = highmem;
1029
1030 /* 1025 /*
1031 * Highmem banks not allowed with !CONFIG_HIGHMEM. 1026 * Highmem banks not allowed with !CONFIG_HIGHMEM.
1032 */ 1027 */
@@ -1039,18 +1034,6 @@ void __init sanity_check_meminfo(void)
1039 } 1034 }
1040 1035
1041 /* 1036 /*
1042 * Check whether this memory bank would entirely overlap
1043 * the vmalloc area.
1044 */
1045 if (bank->start >= vmalloc_limit) {
1046 printk(KERN_NOTICE "Ignoring RAM at %.8llx-%.8llx "
1047 "(vmalloc region overlap).\n",
1048 (unsigned long long)bank->start,
1049 (unsigned long long)bank->start + bank->size - 1);
1050 continue;
1051 }
1052
1053 /*
1054 * Check whether this memory bank would partially overlap 1037 * Check whether this memory bank would partially overlap
1055 * the vmalloc area. 1038 * the vmalloc area.
1056 */ 1039 */