diff options
Diffstat (limited to 'arch/x86/include/asm/pgtable.h')
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 0c734e2a90ca..ebcb60e6a961 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -574,6 +574,11 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) | |||
574 | { | 574 | { |
575 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address); | 575 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address); |
576 | } | 576 | } |
577 | |||
578 | static inline int pgd_bad(pgd_t pgd) | ||
579 | { | ||
580 | return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; | ||
581 | } | ||
577 | #endif /* PAGETABLE_LEVELS > 3 */ | 582 | #endif /* PAGETABLE_LEVELS > 3 */ |
578 | 583 | ||
579 | #endif /* __ASSEMBLY__ */ | 584 | #endif /* __ASSEMBLY__ */ |