x86: unify pmd_page_vaddr
authorJeremy Fitzhardinge <jeremy@goop.org>
Thu, 5 Feb 2009 19:30:59 +0000 (11:30 -0800)
committerJeremy Fitzhardinge <jeremy@goop.org>
Fri, 6 Feb 2009 20:31:49 +0000 (12:31 -0800)
Impact: cleanup

Unify and demacro pmd_page_vaddr.

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 decccb0a64100fa0a4e27e3d6e19c9995943cadc..3789c05bf30af1c239e0a79ab621ce4e92701ecf 100644 (file)
@@ -468,6 +468,11 @@ static inline int pmd_none(pmd_t pmd)
        return !(unsigned long)native_pmd_val(pmd);
 }
 
+static inline unsigned long pmd_page_vaddr(pmd_t pmd)
+{
+       return (unsigned long)__va(pmd_val(pmd) & PTE_PFN_MASK);
+}
+
 #if PAGETABLE_LEVELS > 2
 static inline int pud_present(pud_t pud)
 {
index 26e73569223ca2b211b401d0f5a1a2b464774bce..f7f7e297a0a00abff5536dc7e9a888223e3c8d66 100644 (file)
@@ -126,9 +126,6 @@ static inline int pud_large(pud_t pud) { return 0; }
 
 #define pmd_page(pmd) (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
 
-#define pmd_page_vaddr(pmd)                                    \
-       ((unsigned long)__va(pmd_val((pmd)) & PTE_PFN_MASK))
-
 #if defined(CONFIG_HIGHPTE)
 #define pte_offset_map(dir, address)                                   \
        ((pte_t *)kmap_atomic_pte(pmd_page(*(dir)), KM_PTE0) +          \
index 958dc1e7335e5a8ec2ade0532e93f989aaaa87aa..7a510e8a878711e5c1a9c25f31b4ef0b2271a2b8 100644 (file)
@@ -191,7 +191,6 @@ static inline int pud_large(pud_t pte)
 }
 
 /* PMD  - Level 2 access */
-#define pmd_page_vaddr(pmd) ((unsigned long) __va(pmd_val((pmd)) & PTE_PFN_MASK))
 #define pmd_page(pmd)          (pfn_to_page(pmd_val((pmd)) >> PAGE_SHIFT))
 
 #define pmd_index(address) (((address) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))