]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: unify pgd_bad
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 5 Feb 2009 19:31:09 +0000 (11:31 -0800)
committerJeremy Fitzhardinge <jeremy@goop.org>
Fri, 6 Feb 2009 20:31:50 +0000 (12:31 -0800)
Impact: cleanup

Unify and demacro pgd_bad.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_64.h

index 0c734e2a90caf10a26117be64ea9b095019f063e..ebcb60e6a961c51b70a70b059fb66da4c437ebfd 100644 (file)
@@ -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);
 }
+
+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__ */
index a85ac14df35d584b71fdeb011f41275285919be3..1dfc44932f65f0606561e69bab19fe2e2419e6b9 100644 (file)
@@ -154,11 +154,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
 
 #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;