]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mm/init_32.c
Merge branches 'x86/apic', 'x86/cleanups', 'x86/cpufeature', 'x86/crashdump', 'x86...
[linux-2.6-omap-h63xx.git] / arch / x86 / mm / init_32.c
index 333c9e79d46f9fc78c52771d95478c46090deefd..800e1d94c1b5580e627ddb0a2ef81cfd10d031cd 100644 (file)
@@ -967,8 +967,6 @@ void __init mem_init(void)
        int codesize, reservedpages, datasize, initsize;
        int tmp;
 
-       start_periodic_check_for_corruption();
-
 #ifdef CONFIG_FLATMEM
        BUG_ON(!mem_map);
 #endif
@@ -1038,11 +1036,25 @@ void __init mem_init(void)
                (unsigned long)&_text, (unsigned long)&_etext,
                ((unsigned long)&_etext - (unsigned long)&_text) >> 10);
 
+       /*
+        * Check boundaries twice: Some fundamental inconsistencies can
+        * be detected at build time already.
+        */
+#define __FIXADDR_TOP (-PAGE_SIZE)
+#ifdef CONFIG_HIGHMEM
+       BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE  > FIXADDR_START);
+       BUILD_BUG_ON(VMALLOC_END                        > PKMAP_BASE);
+#endif
+#define high_memory (-128UL << 20)
+       BUILD_BUG_ON(VMALLOC_START                      >= VMALLOC_END);
+#undef high_memory
+#undef __FIXADDR_TOP
+
 #ifdef CONFIG_HIGHMEM
        BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE        > FIXADDR_START);
        BUG_ON(VMALLOC_END                              > PKMAP_BASE);
 #endif
-       BUG_ON(VMALLOC_START                            > VMALLOC_END);
+       BUG_ON(VMALLOC_START                            >= VMALLOC_END);
        BUG_ON((unsigned long)high_memory               > VMALLOC_START);
 
        if (boot_cpu_data.wp_works_ok < 0)