aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/page.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/asm-ia64/page.h b/include/asm-ia64/page.h
index 6e9aa23250c4..2087825eefa4 100644
--- a/include/asm-ia64/page.h
+++ b/include/asm-ia64/page.h
@@ -106,17 +106,25 @@ extern int ia64_pfn_valid (unsigned long pfn);
106# define ia64_pfn_valid(pfn) 1 106# define ia64_pfn_valid(pfn) 1
107#endif 107#endif
108 108
109#ifdef CONFIG_VIRTUAL_MEM_MAP
110extern struct page *vmem_map;
111#ifdef CONFIG_DISCONTIGMEM
112# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
113# define pfn_to_page(pfn) (vmem_map + (pfn))
114#endif
115#endif
116
117#if defined(CONFIG_FLATMEM) || defined(CONFIG_SPARSEMEM)
118/* FLATMEM always configures mem_map (mem_map = vmem_map if necessary) */
119#include <asm-generic/memory_model.h>
120#endif
121
109#ifdef CONFIG_FLATMEM 122#ifdef CONFIG_FLATMEM
110# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn)) 123# define pfn_valid(pfn) (((pfn) < max_mapnr) && ia64_pfn_valid(pfn))
111# define page_to_pfn(page) ((unsigned long) (page - mem_map))
112# define pfn_to_page(pfn) (mem_map + (pfn))
113#elif defined(CONFIG_DISCONTIGMEM) 124#elif defined(CONFIG_DISCONTIGMEM)
114extern struct page *vmem_map;
115extern unsigned long min_low_pfn; 125extern unsigned long min_low_pfn;
116extern unsigned long max_low_pfn; 126extern unsigned long max_low_pfn;
117# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn)) 127# define pfn_valid(pfn) (((pfn) >= min_low_pfn) && ((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
118# define page_to_pfn(page) ((unsigned long) (page - vmem_map))
119# define pfn_to_page(pfn) (vmem_map + (pfn))
120#endif 128#endif
121 129
122#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) 130#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)