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

Unify and demacro pmd_page.

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 3789c05bf30af1c239e0a79ab621ce4e92701ecf..38330d6288fc9f9ce66c9fa438c8c0e6e93b2135 100644 (file)
@@ -473,6 +473,11 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
        return (unsigned long)__va(pmd_val(pmd) & PTE_PFN_MASK);
 }
 
+static inline struct page *pmd_page(pmd_t pmd)
+{
+       return pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT);
+}
+
 #if PAGETABLE_LEVELS > 2
 static inline int pud_present(pud_t pud)
 {
index f7f7e297a0a00abff5536dc7e9a888223e3c8d66..8714110b4a78e6605918742492cfe8d9ee11945d 100644 (file)
@@ -124,8 +124,6 @@ static inline int pud_large(pud_t pud) { return 0; }
 #define pte_offset_kernel(dir, address)                                \
        ((pte_t *)pmd_page_vaddr(*(dir)) +  pte_index((address)))
 
-#define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
-
 #if defined(CONFIG_HIGHPTE)
 #define pte_offset_map(dir, address)                                   \
        ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) +          \
index 7a510e8a878711e5c1a9c25f31b4ef0b2271a2b8..97f24d2d60d1849373ef8eb88c9285a174494d03 100644 (file)
@@ -191,8 +191,6 @@ static inline int pud_large(pud_t pte)
 }
 
 /* PMD  - Level 2 access */
-#define pmd_page(pmd)          (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
-
 #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
 #define pmd_offset(dir, address) ((pmd_t *)pud_page_vaddr(*(dir)) + \
                                  pmd_index(address))