pfn_valid for x86_64 These are the minimal definitions to make x86_64 work with the new pfn_valid. It does not add support for a virtual memory map. Signed-off-by: Christoph Lameter Index: linux-2.6.18-mm3/arch/x86_64/kernel/setup.c =================================================================== --- linux-2.6.18-mm3.orig/arch/x86_64/kernel/setup.c 2006-10-04 21:04:54.000000000 -0700 +++ linux-2.6.18-mm3/arch/x86_64/kernel/setup.c 2006-10-04 21:18:04.000000000 -0700 @@ -386,6 +386,9 @@ * we are rounding upwards: */ end_pfn = e820_end_of_ram(); +#if defined(CONFIG_VIRTUAL_MEM_MAP) || defined(CONFIG_FLATMEM) + max_mapnr = end_pfn; +#endif num_physpages = end_pfn; check_efer(); Index: linux-2.6.18-mm3/include/asm-x86_64/page.h =================================================================== --- linux-2.6.18-mm3.orig/include/asm-x86_64/page.h 2006-09-19 20:42:06.000000000 -0700 +++ linux-2.6.18-mm3/include/asm-x86_64/page.h 2006-10-04 21:15:12.000000000 -0700 @@ -121,9 +121,6 @@ #define __va(x) ((void *)((unsigned long)(x)+PAGE_OFFSET)) #define __boot_va(x) __va(x) #define __boot_pa(x) __pa(x) -#ifdef CONFIG_FLATMEM -#define pfn_valid(pfn) ((pfn) < end_pfn) -#endif #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT)