Impact: cleanup
Unify and demacro pgd_bad.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
{
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 /* __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)
{
return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;