I need to use this function in common code, so define it for hexagon. Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> --- arch/hexagon/include/asm/pgtable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/hexagon/include/asm/pgtable.h b/arch/hexagon/include/asm/pgtable.h index 18cd6ea9ab23..87e96463ccd6 100644 --- a/arch/hexagon/include/asm/pgtable.h +++ b/arch/hexagon/include/asm/pgtable.h @@ -235,10 +235,11 @@ static inline int pmd_bad(pmd_t pmd) return 0; } +#define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT) /* * pmd_page - converts a PMD entry to a page pointer */ -#define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) +#define pmd_page(pmd) (pfn_to_page(pmd_pfn(pmd))) /** * pte_none - check if pte is mapped -- 2.34.1