x86: unify pmd_offset

Impact: cleanup

Unify and demacro pmd_offset.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
This commit is contained in:
Jeremy Fitzhardinge
2009-02-05 11:31:02 -08:00
parent e24d7eee0b
commit 01ade20d5a
3 changed files with 6 additions and 6 deletions

View File

@ -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