Commit 30f10316 authored by Jeremy Fitzhardinge's avatar Jeremy Fitzhardinge

x86: unify pgd_bad

Impact: cleanup

Unify and demacro pgd_bad.
Signed-off-by: default avatarJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
parent 3f6cbef1
...@@ -574,6 +574,11 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) ...@@ -574,6 +574,11 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
{ {
return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address); return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address);
} }
static inline int pgd_bad(pgd_t pgd)
{
return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
}
#endif /* PAGETABLE_LEVELS > 3 */ #endif /* PAGETABLE_LEVELS > 3 */
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
......
...@@ -154,11 +154,6 @@ static inline void native_pgd_clear(pgd_t *pgd) ...@@ -154,11 +154,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline int pgd_bad(pgd_t pgd)
{
return (pgd_val(pgd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
}
static inline int pud_bad(pud_t pud) static inline int pud_bad(pud_t pud)
{ {
return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE; return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment