diff options
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 c1a36dd1e598..a51a97ade636 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -500,6 +500,12 @@ static inline struct page *pgd_page(pgd_t pgd) | |||
500 | { | 500 | { |
501 | return pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT); | 501 | return pfn_to_page(pgd_val(pgd) >> PAGE_SHIFT); |
502 | } | 502 | } |
503 | |||
504 | /* to find an entry in a page-table-directory. */ | ||
505 | static inline unsigned pud_index(unsigned long address) | ||
506 | { | ||
507 | return (address >> PUD_SHIFT) & (PTRS_PER_PUD - 1); | ||
508 | } | ||
503 | #endif /* PAGETABLE_LEVELS > 3 */ | 509 | #endif /* PAGETABLE_LEVELS > 3 */ |
504 | 510 | ||
505 | #endif /* __ASSEMBLY__ */ | 511 | #endif /* __ASSEMBLY__ */ |