diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-05 11:31:02 -0800 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2009-02-06 12:31:49 -0800 |
commit | 01ade20d5a22e6ef002cbb751dddc3a01a78f998 (patch) | |
tree | 28fefbc83299d5924bc3d9fd6d3448e014417762 /arch/x86/include/asm/pgtable.h | |
parent | e24d7eee0beda24504bf6a4aa03be68328557475 (diff) | |
download | blackbird-op-linux-01ade20d5a22e6ef002cbb751dddc3a01a78f998.tar.gz blackbird-op-linux-01ade20d5a22e6ef002cbb751dddc3a01a78f998.zip |
x86: unify pmd_offset
Impact: cleanup
Unify and demacro pmd_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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 4ec24b6d0994..a7dbb05075d2 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -504,6 +504,12 @@ static inline struct page *pud_page(pud_t pud) { return pfn_to_page(pud_val(pud) >> PAGE_SHIFT); } + +/* Find an entry in the second-level page table.. */ +static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address) +{ + return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address); +} #endif /* PAGETABLE_LEVELS > 2 */ #if PAGETABLE_LEVELS > 3 |