x86: unify pud_large
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 5 Feb 2009 19:31:08 +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 pud_large.

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 c61b37af1f28e41af4bd513fcd340ad3ac242cda..0c734e2a90caf10a26117be64ea9b095019f063e 100644 (file)
@@ -540,6 +540,12 @@ static inline unsigned long pmd_pfn(pmd_t pmd)
 {
        return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT;
 }
+
+static inline int pud_large(pud_t pud)
+{
+       return (pud_val(pud) & (_PAGE_PSE | _PAGE_PRESENT)) ==
+               (_PAGE_PSE | _PAGE_PRESENT);
+}
 #endif /* PAGETABLE_LEVELS > 2 */
 
 #if PAGETABLE_LEVELS > 3
index 133fc4e4529aade94d1917e7cb62a674194d3665..ad7830bdc9acdcfe442a5bcbc34487196a536deb 100644 (file)
@@ -95,8 +95,6 @@ extern unsigned long pg0[];
 # include <asm/pgtable-2level.h>
 #endif
 
-static inline int pud_large(pud_t pud) { return 0; }
-
 #if defined(CONFIG_HIGHPTE)
 #define pte_offset_map(dir, address)                                   \
        ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) +          \
index a8bfb75c76ab7a2a961f1baa899ae78784ea288b..a85ac14df35d584b71fdeb011f41275285919be3 100644 (file)
@@ -184,12 +184,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
 
 /* PUD - Level3 access */
 
-static inline int pud_large(pud_t pte)
-{
-       return (pud_val(pte) & (_PAGE_PSE | _PAGE_PRESENT)) ==
-               (_PAGE_PSE | _PAGE_PRESENT);
-}
-
 /* PMD  - Level 2 access */
 #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
 #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) |    \