diff options
-rw-r--r-- | arch/mips/include/asm/page.h | 5 | ||||
-rw-r--r-- | arch/mips/mm/ioremap.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/arch/mips/include/asm/page.h b/arch/mips/include/asm/page.h index bf84e48ad669..dbaec94046da 100644 --- a/arch/mips/include/asm/page.h +++ b/arch/mips/include/asm/page.h | |||
@@ -198,7 +198,10 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) | 200 | #define virt_to_page(kaddr) pfn_to_page(PFN_DOWN(virt_to_phys(kaddr))) |
201 | #define virt_addr_valid(kaddr) pfn_valid(PFN_DOWN(virt_to_phys(kaddr))) | 201 | |
202 | extern int __virt_addr_valid(const volatile void *kaddr); | ||
203 | #define virt_addr_valid(kaddr) \ | ||
204 | __virt_addr_valid((const volatile void *) (kaddr)) | ||
202 | 205 | ||
203 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 206 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
204 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 207 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
diff --git a/arch/mips/mm/ioremap.c b/arch/mips/mm/ioremap.c index cacfd31e8ec9..7657fd21cd3f 100644 --- a/arch/mips/mm/ioremap.c +++ b/arch/mips/mm/ioremap.c | |||
@@ -190,3 +190,9 @@ void __iounmap(const volatile void __iomem *addr) | |||
190 | 190 | ||
191 | EXPORT_SYMBOL(__ioremap); | 191 | EXPORT_SYMBOL(__ioremap); |
192 | EXPORT_SYMBOL(__iounmap); | 192 | EXPORT_SYMBOL(__iounmap); |
193 | |||
194 | int __virt_addr_valid(const volatile void *kaddr) | ||
195 | { | ||
196 | return pfn_valid(PFN_DOWN(virt_to_phys(kaddr))); | ||
197 | } | ||
198 | EXPORT_SYMBOL_GPL(__virt_addr_valid); | ||