x86: unify pte_offset_kernel
Impact: cleanup Unify and demacro pte_offset_kernel. Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
This commit is contained in:
@ -509,6 +509,11 @@ static inline unsigned pte_index(unsigned long address)
|
||||
return (address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1);
|
||||
}
|
||||
|
||||
static inline pte_t *pte_offset_kernel(pmd_t *pmd, unsigned long address)
|
||||
{
|
||||
return (pte_t *)pmd_page_vaddr(*pmd) + pte_index(address);
|
||||
}
|
||||
|
||||
#if PAGETABLE_LEVELS > 2
|
||||
static inline int pud_present(pud_t pud)
|
||||
{
|
||||
|
Reference in New Issue
Block a user