diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2012-12-12 16:52:36 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 20:38:35 -0500 |
commit | 816422ad76474fed8052b6f7b905a054d082e59a (patch) | |
tree | 9918f68e9c5f93be98940b4b7b478e1637547926 /arch/mips | |
parent | 56f2fb147659e05b1e87b99791bf44b988d38545 (diff) |
asm-generic, mm: pgtable: consolidate zero page helpers
We have two different implementation of is_zero_pfn() and my_zero_pfn()
helpers: for architectures with and without zero page coloring.
Let's consolidate them in <asm-generic/pgtable.h>.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/pgtable.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index c02158be836c..14490e9443af 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h | |||
@@ -76,16 +76,7 @@ extern unsigned long zero_page_mask; | |||
76 | 76 | ||
77 | #define ZERO_PAGE(vaddr) \ | 77 | #define ZERO_PAGE(vaddr) \ |
78 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) | 78 | (virt_to_page((void *)(empty_zero_page + (((unsigned long)(vaddr)) & zero_page_mask)))) |
79 | 79 | #define __HAVE_COLOR_ZERO_PAGE | |
80 | #define is_zero_pfn is_zero_pfn | ||
81 | static inline int is_zero_pfn(unsigned long pfn) | ||
82 | { | ||
83 | extern unsigned long zero_pfn; | ||
84 | unsigned long offset_from_zero_pfn = pfn - zero_pfn; | ||
85 | return offset_from_zero_pfn <= (zero_page_mask >> PAGE_SHIFT); | ||
86 | } | ||
87 | |||
88 | #define my_zero_pfn(addr) page_to_pfn(ZERO_PAGE(addr)) | ||
89 | 80 | ||
90 | extern void paging_init(void); | 81 | extern void paging_init(void); |
91 | 82 | ||