]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
x86: unify pmd_bad
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 5 Feb 2009 19:31:11 +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 pmd_bad.

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

index 38882f6cc827b29cee42c664560567e316b86180..72bf53ef60bf5bc9b990b3b4efe362114f3e9f00 100644 (file)
@@ -514,6 +514,11 @@ static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address)
        return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address);
 }
 
+static inline int pmd_bad(pmd_t pmd)
+{
+       return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
+}
+
 #if PAGETABLE_LEVELS > 2
 static inline int pud_present(pud_t pud)
 {
index ad7830bdc9acdcfe442a5bcbc34487196a536deb..5362632df75b4baf01a716d61363a47152b3d143 100644 (file)
@@ -85,8 +85,6 @@ extern void set_pmd_pfn(unsigned long, unsigned long, pgprot_t);
 /* The boot page tables (all created as a single array) */
 extern unsigned long pg0[];
 
-#define pmd_bad(x) ((pmd_val(x) & (PTE_FLAGS_MASK & ~_PAGE_USER)) != _KERNPG_TABLE)
-
 #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT))
 
 #ifdef CONFIG_X86_PAE
index fe8be33df3da7f85104ec1193e17af349fd7b122..d230e28a5f37c4ce773177bb02375f82b915c545 100644 (file)
@@ -154,11 +154,6 @@ static inline void native_pgd_clear(pgd_t *pgd)
 
 #ifndef __ASSEMBLY__
 
-static inline int pmd_bad(pmd_t pmd)
-{
-       return (pmd_val(pmd) & ~(PTE_PFN_MASK | _PAGE_USER)) != _KERNPG_TABLE;
-}
-
 #define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))   /* FIXME: is this right? */
 
 /*