aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/pgtable_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/pgtable_64.h')
-rw-r--r--include/asm-x86/pgtable_64.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h
index efe83dcbd412..1cc50d22d735 100644
--- a/include/asm-x86/pgtable_64.h
+++ b/include/asm-x86/pgtable_64.h
@@ -151,19 +151,19 @@ static inline void native_pgd_clear(pgd_t *pgd)
151 151
152#ifndef __ASSEMBLY__ 152#ifndef __ASSEMBLY__
153 153
154static inline unsigned long pgd_bad(pgd_t pgd) 154static inline int pgd_bad(pgd_t pgd)
155{ 155{
156 return pgd_val(pgd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 156 return (pgd_val(pgd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
157} 157}
158 158
159static inline unsigned long pud_bad(pud_t pud) 159static inline int pud_bad(pud_t pud)
160{ 160{
161 return pud_val(pud) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 161 return (pud_val(pud) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
162} 162}
163 163
164static inline unsigned long pmd_bad(pmd_t pmd) 164static inline int pmd_bad(pmd_t pmd)
165{ 165{
166 return pmd_val(pmd) & ~(PTE_MASK | _KERNPG_TABLE | _PAGE_USER); 166 return (pmd_val(pmd) & ~(PTE_MASK | _PAGE_USER)) != _KERNPG_TABLE;
167} 167}
168 168
169#define pte_none(x) (!pte_val((x))) 169#define pte_none(x) (!pte_val((x)))