aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/page.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/page.h')
-rw-r--r--include/asm-mips/page.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 6b97744f00cd..6ed1151a05a3 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -138,16 +138,14 @@ typedef struct { unsigned long pgprot; } pgprot_t;
138 138
139#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 139#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
140 140
141#ifndef CONFIG_SPARSEMEM
142#ifndef CONFIG_NEED_MULTIPLE_NODES
143#define pfn_valid(pfn) ((pfn) < max_mapnr)
144#endif
145#endif
146
147#ifdef CONFIG_FLATMEM 141#ifdef CONFIG_FLATMEM
148 142
149#define pfn_valid(pfn) ((pfn) < max_mapnr) 143#define pfn_valid(pfn) ((pfn) < max_mapnr)
150 144
145#elif defined(CONFIG_SPARSEMEM)
146
147/* pfn_valid is defined in linux/mmzone.h */
148
151#elif defined(CONFIG_NEED_MULTIPLE_NODES) 149#elif defined(CONFIG_NEED_MULTIPLE_NODES)
152 150
153#define pfn_valid(pfn) \ 151#define pfn_valid(pfn) \
@@ -159,8 +157,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
159 : 0); \ 157 : 0); \
160}) 158})
161 159
162#else
163#error Provide a definition of pfn_valid
164#endif 160#endif
165 161
166#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 162#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)