Commit 96e70f83 authored by Minfei Huang's avatar Minfei Huang Committed by Ingo Molnar

x86/mm: Avoid overlap the fixmap area on i386

It is a problem when configuring high memory off where the
vmalloc reserve area could end up overlapping the early_ioremap
fixmap area on i386.

The ordering of the VMALLOC_RESERVE space is:

 FIXADDR_TOP
                       fixed_addresses
 FIXADDR_START
                       early_ioremap fixed addresses
 FIXADDR_BOOT_START
                       Persistent kmap area
 PKMAP_BASE
 VMALLOC_END
                       Vmalloc area
 VMALLOC_START
 high_memory

The available address we can use is lower than
FIXADDR_BOOT_START. So we will set the kmap boundary below the
FIXADDR_BOOT_START, if we configure high memory.

If we configure high memory, the vmalloc reserve area should
end up to PKMAP_BASE, otherwise should end up to
FIXADDR_BOOT_START.
Signed-off-by: default avatarMinfei Huang <mnfhuang@gmail.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/6B680A9E-6CE9-4C96-934B-CB01DCB58278@gmail.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent cac7f242
...@@ -43,7 +43,7 @@ extern bool __vmalloc_start_set; /* set once high_memory is set */ ...@@ -43,7 +43,7 @@ extern bool __vmalloc_start_set; /* set once high_memory is set */
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
# define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE) # define VMALLOC_END (PKMAP_BASE - 2 * PAGE_SIZE)
#else #else
# define VMALLOC_END (FIXADDR_START - 2 * PAGE_SIZE) # define VMALLOC_END (FIXADDR_BOOT_START - 2 * PAGE_SIZE)
#endif #endif
#define MODULES_VADDR VMALLOC_START #define MODULES_VADDR VMALLOC_START
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment