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

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

index a51a97ade6367f7a65efd15d0db95ef9a626a1cf..decccb0a64100fa0a4e27e3d6e19c9995943cadc 100644 (file)
@@ -506,6 +506,11 @@ static inline unsigned pud_index(unsigned long address)
 {
        return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1);
 }
+
+static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address)
+{
+       return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address);
+}
 #endif /* PAGETABLE_LEVELS > 3 */
 
 #endif /* __ASSEMBLY__ */
index c17c30f5751ad6504e9a9a44553ed765a6e3fe69..958dc1e7335e5a8ec2ade0532e93f989aaaa87aa 100644 (file)
@@ -183,8 +183,6 @@ static inline int pgd_large(pgd_t pgd) { return 0; }
 #define mk_kernel_pgd(address) __pgd((address) | _KERNPG_TABLE)
 
 /* PUD - Level3 access */
-#define pud_offset(pgd, address)                                       \
-       ((pud_t *)pgd_page_vaddr(*(pgd)) + pud_index((address)))
 
 static inline int pud_large(pud_t pte)
 {
This page took 0.033551 seconds and 5 git commands to generate.