diff options
Diffstat (limited to 'arch/mips/include/asm/pgtable-64.h')
-rw-r--r-- | arch/mips/include/asm/pgtable-64.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/mips/include/asm/pgtable-64.h b/arch/mips/include/asm/pgtable-64.h index c26e18250079..f5b521d5a67d 100644 --- a/arch/mips/include/asm/pgtable-64.h +++ b/arch/mips/include/asm/pgtable-64.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #ifndef _ASM_PGTABLE_64_H | 9 | #ifndef _ASM_PGTABLE_64_H |
10 | #define _ASM_PGTABLE_64_H | 10 | #define _ASM_PGTABLE_64_H |
11 | 11 | ||
12 | #include <linux/compiler.h> | ||
12 | #include <linux/linkage.h> | 13 | #include <linux/linkage.h> |
13 | 14 | ||
14 | #include <asm/addrspace.h> | 15 | #include <asm/addrspace.h> |
@@ -172,7 +173,19 @@ static inline int pmd_none(pmd_t pmd) | |||
172 | return pmd_val(pmd) == (unsigned long) invalid_pte_table; | 173 | return pmd_val(pmd) == (unsigned long) invalid_pte_table; |
173 | } | 174 | } |
174 | 175 | ||
175 | #define pmd_bad(pmd) (pmd_val(pmd) & ~PAGE_MASK) | 176 | static inline int pmd_bad(pmd_t pmd) |
177 | { | ||
178 | #ifdef CONFIG_HUGETLB_PAGE | ||
179 | /* pmd_huge(pmd) but inline */ | ||
180 | if (unlikely(pmd_val(pmd) & _PAGE_HUGE)) | ||
181 | return 0; | ||
182 | #endif | ||
183 | |||
184 | if (unlikely(pmd_val(pmd) & ~PAGE_MASK)) | ||
185 | return 1; | ||
186 | |||
187 | return 0; | ||
188 | } | ||
176 | 189 | ||
177 | static inline int pmd_present(pmd_t pmd) | 190 | static inline int pmd_present(pmd_t pmd) |
178 | { | 191 | { |