diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-05 19:30:58 (GMT) |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 20:31:49 (GMT) |
commit | 3d081b1812bd4de2bbef58c6d598ddf45493010e (patch) | |
tree | 698e5da0c1329ab1dd77ce8f8447e581e54fcba6 /arch/x86/include/asm/pgtable.h | |
parent | 7cfb81024bc1dbe8ad2bf5affd58a6a7ad4172ba (diff) | |
download | linux-3d081b1812bd4de2bbef58c6d598ddf45493010e.tar.xz |
x86: unify pud_offset
Impact: cleanup
Unify and demacro pud_offset.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Diffstat (limited to 'arch/x86/include/asm/pgtable.h')
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index a51a97a..decccb0 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -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__ */ |