]> 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:10 +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-3level.h
arch/x86/include/asm/pgtable.h
arch/x86/include/asm/pgtable_64.h

index 7ad9d05710b145f9bed008b93e0cadcefe14f96d..b92524eec2027a1b9564bb9e743d9d2338309f83 100644 (file)
@@ -23,11 +23,6 @@ static inline int pud_none(pud_t pud)
        return pud_val(pud) == 0;
 }
 
-static inline int pud_bad(pud_t pud)
-{
-       return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
-}
-
 /* Rules for using set_pte: the pte being assigned *must* be
  * either not present or in a state where the hardware will
  * not attempt to update the pte.  In places where this is
index ebcb60e6a961c51b70a70b059fb66da4c437ebfd..38882f6cc827b29cee42c664560567e316b86180 100644 (file)
@@ -546,6 +546,11 @@ static inline int pud_large(pud_t pud)
        return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
                (_PAGE_PSE | _PAGE_PRESENT);
 }
+
+static inline int pud_bad(pud_t pud)
+{
+       return (pud_val(pud) & ~(PTE_PFN_MASK | _KERNPG_TABLE | _PAGE_USER)) != 0;
+}
 #endif /* PAGETABLE_LEVELS > 2 */
 
 #if PAGETABLE_LEVELS > 3
index 1dfc44932f65f0606561e69bab19fe2e2419e6b9..fe8be33df3da7f85104ec1193e17af349fd7b122 100644 (file)
@@ -154,11 +154,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
 
 #ifndef __ASSEMBLY__
 
-static inline int pud_bad(pud_t pud)
-{
-       return (pud_val(pud) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
-}
-
 static inline int pmd_bad(pmd_t pmd)
 {
        return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;