diff options
-rw-r--r-- | arch/x86/mm/pgtable_32.c | 3 | ||||
-rw-r--r-- | include/asm-x86/page_32.h | 3 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index cab0abbd1ebe..0951db9ee519 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -123,7 +123,8 @@ static int __init parse_vmalloc(char *arg) | |||
123 | if (!arg) | 123 | if (!arg) |
124 | return -EINVAL; | 124 | return -EINVAL; |
125 | 125 | ||
126 | __VMALLOC_RESERVE = memparse(arg, &arg); | 126 | /* Add VMALLOC_OFFSET to the parsed value due to vm area guard hole*/ |
127 | __VMALLOC_RESERVE = memparse(arg, &arg) + VMALLOC_OFFSET; | ||
127 | return 0; | 128 | return 0; |
128 | } | 129 | } |
129 | early_param("vmalloc", parse_vmalloc); | 130 | early_param("vmalloc", parse_vmalloc); |
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h index ab8528793f08..632feb156cc2 100644 --- a/include/asm-x86/page_32.h +++ b/include/asm-x86/page_32.h | |||
@@ -89,9 +89,6 @@ extern int nx_enabled; | |||
89 | extern unsigned int __VMALLOC_RESERVE; | 89 | extern unsigned int __VMALLOC_RESERVE; |
90 | extern int sysctl_legacy_va_layout; | 90 | extern int sysctl_legacy_va_layout; |
91 | 91 | ||
92 | #define VMALLOC_RESERVE ((unsigned long)__VMALLOC_RESERVE) | ||
93 | #define MAXMEM (-__PAGE_OFFSET - __VMALLOC_RESERVE) | ||
94 | |||
95 | extern void find_low_pfn_range(void); | 92 | extern void find_low_pfn_range(void); |
96 | extern unsigned long init_memory_mapping(unsigned long start, | 93 | extern unsigned long init_memory_mapping(unsigned long start, |
97 | unsigned long end); | 94 | unsigned long end); |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index 5c3b26567a95..9bb5269475cc 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -56,8 +56,7 @@ void paging_init(void); | |||
56 | * area for the same reason. ;) | 56 | * area for the same reason. ;) |
57 | */ | 57 | */ |
58 | #define VMALLOC_OFFSET (8 * 1024 * 1024) | 58 | #define VMALLOC_OFFSET (8 * 1024 * 1024) |
59 | #define VMALLOC_START (((unsigned long)high_memory + 2 * VMALLOC_OFFSET - 1) \ | 59 | #define VMALLOC_START ((unsigned long)high_memory + VMALLOC_OFFSET) |
60 | & ~(VMALLOC_OFFSET - 1)) | ||
61 | #ifdef CONFIG_X86_PAE | 60 | #ifdef CONFIG_X86_PAE |
62 | #define LAST_PKMAP 512 | 61 | #define LAST_PKMAP 512 |
63 | #else | 62 | #else |
@@ -73,6 +72,8 @@ void paging_init(void); | |||
73 | # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) | 72 | # define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) |
74 | #endif | 73 | #endif |
75 | 74 | ||
75 | #define MAXMEM (VMALLOC_END - PAGE_OFFSET - __VMALLOC_RESERVE) | ||
76 | |||
76 | /* | 77 | /* |
77 | * Define this if things work differently on an i386 and an i486: | 78 | * Define this if things work differently on an i386 and an i486: |
78 | * it will (on an i486) warn about kernel memory accesses that are | 79 | * it will (on an i486) warn about kernel memory accesses that are |