From d29eff7bca60c9ee401d691d4562a4abca8de543 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 16 Oct 2007 01:24:17 -0700 Subject: ppc64: SPARSEMEM_VMEMMAP support Enable virtual memmap support for SPARSEMEM on PPC64 systems. Slice a 16th off the end of the linear mapping space and use that to hold the vmemmap. Uses the same size mapping as uses in the linear 1:1 kernel mapping. [pbadari@gmail.com: fix warning] Signed-off-by: Andy Whitcroft Acked-by: Mel Gorman Cc: Christoph Lameter Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: KAMEZAWA Hiroyuki Signed-off-by: Badari Pulavarty Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-powerpc/pgtable-ppc64.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/asm-powerpc') diff --git a/include/asm-powerpc/pgtable-ppc64.h b/include/asm-powerpc/pgtable-ppc64.h index 300f9a199bf..dd4c26dc57d 100644 --- a/include/asm-powerpc/pgtable-ppc64.h +++ b/include/asm-powerpc/pgtable-ppc64.h @@ -67,6 +67,14 @@ #define KERNEL_REGION_ID (REGION_ID(PAGE_OFFSET)) #define USER_REGION_ID (0UL) +/* + * Defines the address of the vmemap area, in the top 16th of the + * kernel region. + */ +#define VMEMMAP_BASE (ASM_CONST(CONFIG_KERNEL_START) + \ + (0xfUL << (REGION_SHIFT - 4))) +#define vmemmap ((struct page *)VMEMMAP_BASE) + /* * Common bits in a linux-style PTE. These match the bits in the * (hardware-defined) PowerPC PTE as closely as possible. Additional -- cgit v1.2.3