aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm64/include/asm/pgtable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index df22314f57cf..210d632aa5ad 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -298,7 +298,6 @@ void pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address,
298#define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot))) 298#define pfn_pmd(pfn,prot) (__pmd(((phys_addr_t)(pfn) << PAGE_SHIFT) | pgprot_val(prot)))
299#define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot) 299#define mk_pmd(page,prot) pfn_pmd(page_to_pfn(page),prot)
300 300
301#define pmd_page(pmd) pfn_to_page(__phys_to_pfn(pmd_val(pmd) & PHYS_MASK))
302#define pud_write(pud) pte_write(pud_pte(pud)) 301#define pud_write(pud) pte_write(pud_pte(pud))
303#define pud_pfn(pud) (((pud_val(pud) & PUD_MASK) & PHYS_MASK) >> PAGE_SHIFT) 302#define pud_pfn(pud) (((pud_val(pud) & PUD_MASK) & PHYS_MASK) >> PAGE_SHIFT)
304 303
@@ -401,7 +400,7 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
401 return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr); 400 return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(addr);
402} 401}
403 402
404#define pud_page(pud) pmd_page(pud_pmd(pud)) 403#define pud_page(pud) pfn_to_page(__phys_to_pfn(pud_val(pud) & PHYS_MASK))
405 404
406#endif /* CONFIG_ARM64_PGTABLE_LEVELS > 2 */ 405#endif /* CONFIG_ARM64_PGTABLE_LEVELS > 2 */
407 406
@@ -437,6 +436,8 @@ static inline pud_t *pud_offset(pgd_t *pgd, unsigned long addr)
437 return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(addr); 436 return (pud_t *)pgd_page_vaddr(*pgd) + pud_index(addr);
438} 437}
439 438
439#define pgd_page(pgd) pfn_to_page(__phys_to_pfn(pgd_val(pgd) & PHYS_MASK))
440
440#endif /* CONFIG_ARM64_PGTABLE_LEVELS > 3 */ 441#endif /* CONFIG_ARM64_PGTABLE_LEVELS > 3 */
441 442
442#define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd)) 443#define pgd_ERROR(pgd) __pgd_error(__FILE__, __LINE__, pgd_val(pgd))