MIPS: 64-bit: Detect virtual memory size
Linux kernel 2.6.32 and later allocate address space from the top of the kernel virtual memory address space. This patch implements virtual memory size detection for 64 bit MIPS CPUs to avoid resulting crashes. Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/935/ Reviewed-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
ba284b1f19
commit
91dfc423cc
@@ -110,7 +110,9 @@
|
||||
#define VMALLOC_START MAP_BASE
|
||||
#define VMALLOC_END \
|
||||
(VMALLOC_START + \
|
||||
PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE - (1UL << 32))
|
||||
min(PTRS_PER_PGD * PTRS_PER_PMD * PTRS_PER_PTE * PAGE_SIZE, \
|
||||
(1UL << cpu_vmbits)) - (1UL << 32))
|
||||
|
||||
#if defined(CONFIG_MODULES) && defined(KBUILD_64BIT_SYM32) && \
|
||||
VMALLOC_START != CKSSEG
|
||||
/* Load modules into 32bit-compatible segment. */
|
||||
|
Reference in New Issue
Block a user