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

Unify and demacro pud_page_vaddr.

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

index 524bd91b99522a737aba68d76447f83840bceea6..542616ac192a4107db188c0267c17769f3d4d396 100644 (file)
@@ -117,9 +117,6 @@ static inline void pud_clear(pud_t *pudp)
 
 #define pud_page(pud) pfn_to_page(pud_val(pud) >> PAGE_SHIFT)
 
-#define pud_page_vaddr(pud) ((unsigned long) __va(pud_val(pud) & PTE_PFN_MASK))
-
-
 /* Find an entry in the second-level page table.. */
 #define pmd_offset(pud, address) ((pmd_t *)pud_page_vaddr(*(pud)) +    \
                                  pmd_index(address))
index cca4321e07606aae91fd22b04bd71bd6dc32e652..4638b4af67506ea11058d66c7b295cba3f1abd1c 100644 (file)
@@ -462,6 +462,11 @@ static inline int pud_present(pud_t pud)
 {
        return pud_val(pud) & _PAGE_PRESENT;
 }
+
+static inline unsigned long pud_page_vaddr(pud_t pud)
+{
+       return (unsigned long)__va((unsigned long)pud_val(pud) & PTE_PFN_MASK);
+}
 #endif /* PAGETABLE_LEVELS > 2 */
 
 #if PAGETABLE_LEVELS > 3
index 4f8dbb99b6928bdce5a448f6c6e1e81b0d460fc1..9875e40c058dca71ac12cf9d3c28d0633c938418 100644 (file)
@@ -185,8 +185,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
 
 /* PUD - Level3 access */
 /* to find an entry in a page-table-directory. */
-#define pud_page_vaddr(pud)                                            \
-       ((unsigned long)__va(pud_val((pud)) & PHYSICAL_PAGE_MASK))
 #define pud_page(pud)  (pfn_to_page(pud_val((pud)) >> PAGE_SHIFT))
 #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD - 1))
 #define pud_offset(pgd, address)                                       \