diff options
Diffstat (limited to 'include/asm-mips/page.h')
-rw-r--r-- | include/asm-mips/page.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 85b258ee7090..edb33a14ae9e 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -34,7 +34,9 @@ | |||
34 | 34 | ||
35 | #ifndef __ASSEMBLY__ | 35 | #ifndef __ASSEMBLY__ |
36 | 36 | ||
37 | #include <linux/pfn.h> | ||
37 | #include <asm/cpu-features.h> | 38 | #include <asm/cpu-features.h> |
39 | #include <asm/io.h> | ||
38 | 40 | ||
39 | extern void clear_page(void * page); | 41 | extern void clear_page(void * page); |
40 | extern void copy_page(void * to, void * from); | 42 | extern void copy_page(void * to, void * from); |
@@ -160,8 +162,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
160 | 162 | ||
161 | #endif | 163 | #endif |
162 | 164 | ||
163 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | 165 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) |
164 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | 166 | #define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr))) |
165 | 167 | ||
166 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 168 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
167 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 169 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |