Skip to content
Commit 68ecabd0 authored by Gavin Shan's avatar Gavin Shan Committed by Will Deacon
Browse files

arm64/mm: Use phys_to_page() to access pgtable memory



The macros {pgd, pud, pmd}_page() retrieves the page struct of the
corresponding page frame, which is reserved as page table. There
is already a macro (phys_to_page), defined in memory.h as below,
to convert the physical address to the page struct. Also, the header
file (memory.h) has been included by pgtable.h.

   #define phys_to_page(phys)      (pfn_to_page(__phys_to_pfn(phys)))

So it's reasonable to use the macro in pgtable.h.

Signed-off-by: default avatarGavin Shan <gshan@redhat.com>
Reviewed-by: default avatarMark Rutland <mark.rutland@arm.com>
Link: https://lore.kernel.org/r/20200427234655.111847-1-gshan@redhat.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 2eaf63ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment