Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[IA64] Fix DISCONTIGMEM without VIRTUAL_MEM_MAP

make allnoconfig currently fails to build because it selects DISCONTIGMEM
without VIRTUAL_MEM_MAP. I see no particular reason this combination
ought to fail, so I fixed it by:

- Including memory_model.h in all circumstances, except when both
DISCONTIGMEM and VIRTUAL_MEM_MAP are enabled.
- Defining ia64_pfn_valid() to 1 unless VIRTUAL_MEM_MAP is enabled

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Matthew Wilcox and committed by
Tony Luck
b0f40ea0 17e77b1c

+5 -6
+5 -6
include/asm-ia64/page.h
··· 101 101 102 102 #ifdef CONFIG_VIRTUAL_MEM_MAP 103 103 extern int ia64_pfn_valid (unsigned long pfn); 104 - #elif defined(CONFIG_FLATMEM) 104 + #else 105 105 # define ia64_pfn_valid(pfn) 1 106 106 #endif 107 107 ··· 110 110 #ifdef CONFIG_DISCONTIGMEM 111 111 # define page_to_pfn(page) ((unsigned long) (page - vmem_map)) 112 112 # define pfn_to_page(pfn) (vmem_map + (pfn)) 113 + #else 114 + # include <asm-generic/memory_model.h> 113 115 #endif 114 - #endif 115 - 116 - #if defined(CONFIG_FLATMEM) || defined(CONFIG_SPARSEMEM) 117 - /* FLATMEM always configures mem_map (mem_map = vmem_map if necessary) */ 118 - #include <asm-generic/memory_model.h> 116 + #else 117 + # include <asm-generic/memory_model.h> 119 118 #endif 120 119 121 120 #ifdef CONFIG_FLATMEM