aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorFenkart/Bostandzhyan <andreas.fenkart@streamunlimited.com>2010-02-07 21:47:58 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-02-15 21:40:33 +0000
commita183927213df225bd93d21857b6aaafbb95e590d (patch)
tree4bda3f0d2f59e3ca9dc92159fe77911c65f78b20 /arch/arm
parentc931b4f655a1b86c929384e674eb8c31795f3bd7 (diff)
downloadkernel_samsung_tuna-a183927213df225bd93d21857b6aaafbb95e590d.zip
kernel_samsung_tuna-a183927213df225bd93d21857b6aaafbb95e590d.tar.gz
kernel_samsung_tuna-a183927213df225bd93d21857b6aaafbb95e590d.tar.bz2
ARM: 5929/1: Add checks to detect overlap of memory regions.
Tested-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Andreas Fenkart <andreas.fenkart@streamunlimited.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mm/init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 3a20772..7829cb5 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -686,6 +686,23 @@ void __init mem_init(void)
#undef MLM
#undef MLK_ROUNDUP
+ /*
+ * Check boundaries twice: Some fundamental inconsistencies can
+ * be detected at build time already.
+ */
+#ifdef CONFIG_MMU
+ BUILD_BUG_ON(VMALLOC_END > CONSISTENT_BASE);
+ BUG_ON(VMALLOC_END > CONSISTENT_BASE);
+
+ BUILD_BUG_ON(TASK_SIZE > MODULES_VADDR);
+ BUG_ON(TASK_SIZE > MODULES_VADDR);
+#endif
+
+#ifdef CONFIG_HIGHMEM
+ BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET);
+ BUG_ON(PKMAP_BASE + LAST_PKMAP * PAGE_SIZE > PAGE_OFFSET);
+#endif
+
if (PAGE_SIZE >= 16384 && num_physpages <= 128) {
extern int sysctl_overcommit_memory;
/*