diff options
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/pgtable.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index 1a9f9b257551..d6eb6134abec 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h | |||
@@ -76,6 +76,16 @@ extern unsigned long zero_page_mask; | |||
76 | #define ZERO_PAGE(vaddr) \ | 76 | #define ZERO_PAGE(vaddr) \ |
77 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) | 77 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) |
78 | 78 | ||
79 | #define is_zero_pfn is_zero_pfn | ||
80 | static inline int is_zero_pfn(unsigned long pfn) | ||
81 | { | ||
82 | extern unsigned long zero_pfn; | ||
83 | unsigned long offset_from_zero_pfn = pfn - zero_pfn; | ||
84 | return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); | ||
85 | } | ||
86 | |||
87 | #define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) | ||
88 | |||
79 | extern void paging_init(void); | 89 | extern void paging_init(void); |
80 | 90 | ||
81 | /* | 91 | /* |