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

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

index a7dbb05075d2779d733399c0732883d73add5426..532144c2f1cce314b7eb8d553f5075452f986037 100644 (file)
@@ -510,6 +510,11 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
 {
        return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
 }
+
+static inline unsigned long pmd_pfn(pmd_t pmd)
+{
+       return (pmd_val(pmd) & PTE_PFN_MASK) >> PAGE_SHIFT;
+}
 #endif /* PAGETABLE_LEVELS > 2 */
 
 #if PAGETABLE_LEVELS > 3
index 6cc4133705b98958ca3e83863abd2a2926f8b5b2..279ddc6a4eb879aad9da902e1b5e4d105a8fa73c 100644 (file)
@@ -191,8 +191,6 @@ static inline int pud_large(pud_t pte)
 }
 
 /* PMD  - Level 2 access */
-#define pmd_pfn(x)  ((pmd_val((x)) & __PHYSICAL_MASK) >> PAGE_SHIFT)
-
 #define pte_to_pgoff(pte) ((pte_val((pte)) & PHYSICAL_PAGE_MASK) >> PAGE_SHIFT)
 #define pgoff_to_pte(off) ((pte_t) { .pte = ((off) << PAGE_SHIFT) |    \
                                            _PAGE_FILE })