From: Christoph Lameter Equip IA64 sparsemem with a virtual memmap. This is similar to the existing CONFIG_VIRTUAL_MEM_MAP functionality for DISCONTIGMEM. It uses a PAGE_SIZE mapping. This is provided as a minimally intrusive solution. We split the 128TB VMALLOC area into two 64TB areas and use one for the virtual memmap. This should replace CONFIG_VIRTUAL_MEM_MAP long term. Signed-off-by: Christoph Lameter Signed-off-by: Andy Whitcroft Acked-by: Mel Gorman Cc: "Luck, Tony" Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton --- arch/ia64/Kconfig | 4 ++++ include/asm-ia64/pgtable.h | 6 ++++++ 2 files changed, 10 insertions(+) diff -puN arch/ia64/Kconfig~ia64-sparsemem_vmemmap-16k-page-size-support arch/ia64/Kconfig --- a/arch/ia64/Kconfig~ia64-sparsemem_vmemmap-16k-page-size-support +++ a/arch/ia64/Kconfig @@ -349,6 +349,10 @@ config ARCH_SPARSEMEM_ENABLE def_bool y depends on ARCH_DISCONTIGMEM_ENABLE +config SPARSEMEM_VMEMMAP + def_bool y + depends on SPARSEMEM + config ARCH_DISCONTIGMEM_DEFAULT def_bool y if (IA64_SGI_SN2 || IA64_GENERIC || IA64_HP_ZX1 || IA64_HP_ZX1_SWIOTLB) depends on ARCH_DISCONTIGMEM_ENABLE diff -puN include/asm-ia64/pgtable.h~ia64-sparsemem_vmemmap-16k-page-size-support include/asm-ia64/pgtable.h --- a/include/asm-ia64/pgtable.h~ia64-sparsemem_vmemmap-16k-page-size-support +++ a/include/asm-ia64/pgtable.h @@ -236,8 +236,14 @@ ia64_phys_addr_valid (unsigned long addr # define VMALLOC_END vmalloc_end extern unsigned long vmalloc_end; #else +#if defined(CONFIG_SPARSEMEM) && defined(CONFIG_SPARSEMEM_VMEMMAP) +/* SPARSEMEM_VMEMMAP uses half of vmalloc... */ +# define VMALLOC_END (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 10))) +# define vmemmap ((struct page *)VMALLOC_END) +#else # define VMALLOC_END (RGN_BASE(RGN_GATE) + (1UL << (4*PAGE_SHIFT - 9))) #endif +#endif /* fs/proc/kcore.c */ #define kc_vaddr_to_offset(v) ((v) - RGN_BASE(RGN_GATE)) _