diff options
Diffstat (limited to 'arch/mips/include/asm/page.h')
-rw-r--r-- | arch/mips/include/asm/page.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index eab99e536b5c..f59552fae917 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -46,7 +46,6 @@ | |||
46 | #endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ | 46 | #endif /* CONFIG_MIPS_HUGE_TLB_SUPPORT */ |
47 | 47 | ||
48 | #include <linux/pfn.h> | 48 | #include <linux/pfn.h> |
49 | #include <asm/io.h> | ||
50 | 49 | ||
51 | extern void build_clear_page(void); | 50 | extern void build_clear_page(void); |
52 | extern void build_copy_page(void); | 51 | extern void build_copy_page(void); |
@@ -151,6 +150,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
151 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) | 150 | ((unsigned long)(x) - PAGE_OFFSET + PHYS_OFFSET) |
152 | #endif | 151 | #endif |
153 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) | 152 | #define __va(x) ((void *)((unsigned long)(x) + PAGE_OFFSET - PHYS_OFFSET)) |
153 | #include <asm/io.h> | ||
154 | 154 | ||
155 | /* | 155 | /* |
156 | * RELOC_HIDE was originally added by 6007b903dfe5f1d13e0c711ac2894bdd4a61b1ad | 156 | * RELOC_HIDE was originally added by 6007b903dfe5f1d13e0c711ac2894bdd4a61b1ad |
@@ -171,14 +171,13 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
171 | 171 | ||
172 | #ifdef CONFIG_FLATMEM | 172 | #ifdef CONFIG_FLATMEM |
173 | 173 | ||
174 | #define pfn_valid(pfn) \ | 174 | static inline int pfn_valid(unsigned long pfn) |
175 | ({ \ | 175 | { |
176 | unsigned long __pfn = (pfn); \ | 176 | /* avoid <linux/mm.h> include hell */ |
177 | /* avoid <linux/bootmem.h> include hell */ \ | 177 | extern unsigned long max_mapnr; |
178 | extern unsigned long min_low_pfn; \ | 178 | |
179 | \ | 179 | return pfn >= ARCH_PFN_OFFSET && pfn < max_mapnr; |
180 | __pfn >= min_low_pfn && __pfn < max_mapnr; \ | 180 | } |
181 | }) | ||
182 | 181 | ||
183 | #elif defined(CONFIG_SPARSEMEM) | 182 | #elif defined(CONFIG_SPARSEMEM) |
184 | 183 | ||