diff options
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 a51a97ade636..decccb0a6410 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) | |||
506 | { | 506 | { |
507 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1); | 507 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1); |
508 | } | 508 | } |
509 | |||
510 | static inline pud_t *pud_offset(pgd_t *pgd, unsigned long address) | ||
511 | { | ||
512 | return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(address); | ||
513 | } | ||
509 | #endif /* PAGETABLE_LEVELS > 3 */ | 514 | #endif /* PAGETABLE_LEVELS > 3 */ |
510 | 515 | ||
511 | #endif /* __ASSEMBLY__ */ | 516 | #endif /* __ASSEMBLY__ */ |