x86: unify pud_offset

Impact: cleanup

Unify and demacro pud_offset.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
This commit is contained in:
Jeremy Fitzhardinge
2009-02-05 11:30:58 -08:00
parent 7cfb81024b
commit 3d081b1812
2 changed files with 5 additions and 2 deletions

View 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__ */