diff options
| -rw-r--r-- | arch/x86/mm/init_32.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index c483f4242079..d3a45d54547a 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
| @@ -1040,11 +1040,25 @@ void __init mem_init(void) | |||
| 1040 | (unsigned long)&_text, (unsigned long)&_etext, | 1040 | (unsigned long)&_text, (unsigned long)&_etext, |
| 1041 | ((unsigned long)&_etext - (unsigned long)&_text) >> 10); | 1041 | ((unsigned long)&_etext - (unsigned long)&_text) >> 10); |
| 1042 | 1042 | ||
| 1043 | /* | ||
| 1044 | * Check boundaries twice: Some fundamental inconsistencies can | ||
| 1045 | * be detected at build time already. | ||
| 1046 | */ | ||
| 1047 | #define __FIXADDR_TOP (-PAGE_SIZE) | ||
| 1048 | #ifdef CONFIG_HIGHMEM | ||
| 1049 | BUILD_BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE > FIXADDR_START); | ||
| 1050 | BUILD_BUG_ON(VMALLOC_END > PKMAP_BASE); | ||
| 1051 | #endif | ||
| 1052 | #define high_memory (-128UL << 20) | ||
| 1053 | BUILD_BUG_ON(VMALLOC_START >= VMALLOC_END); | ||
| 1054 | #undef high_memory | ||
| 1055 | #undef __FIXADDR_TOP | ||
| 1056 | |||
| 1043 | #ifdef CONFIG_HIGHMEM | 1057 | #ifdef CONFIG_HIGHMEM |
| 1044 | BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE > FIXADDR_START); | 1058 | BUG_ON(PKMAP_BASE + LAST_PKMAP*PAGE_SIZE > FIXADDR_START); |
| 1045 | BUG_ON(VMALLOC_END > PKMAP_BASE); | 1059 | BUG_ON(VMALLOC_END > PKMAP_BASE); |
| 1046 | #endif | 1060 | #endif |
| 1047 | BUG_ON(VMALLOC_START > VMALLOC_END); | 1061 | BUG_ON(VMALLOC_START >= VMALLOC_END); |
| 1048 | BUG_ON((unsigned long)high_memory > VMALLOC_START); | 1062 | BUG_ON((unsigned long)high_memory > VMALLOC_START); |
| 1049 | 1063 | ||
| 1050 | if (boot_cpu_data.wp_works_ok < 0) | 1064 | if (boot_cpu_data.wp_works_ok < 0) |
