From 7106c51ee9a1b65eff63496636fce36bf246c1a0 Mon Sep 17 00:00:00 2001 From: Mike Rapoport Date: Fri, 4 Feb 2022 13:49:20 -0500 Subject: arch: Add pmd_pfn() where it is missing We need to use this function in common code, so define it for architectures and/or configrations that miss it. The result of pmd_pfn() will only be used if TRANSPARENT_HUGEPAGE is enabled, but a function or macro called pmd_pfn() must be defined, even on machines with two level page tables. Signed-off-by: Mike Rapoport Signed-off-by: Matthew Wilcox (Oracle) --- arch/microblaze/include/asm/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'arch/microblaze/include/asm') diff --git a/arch/microblaze/include/asm/pgtable.h b/arch/microblaze/include/asm/pgtable.h index c136a01e467e..0c72646370e1 100644 --- a/arch/microblaze/include/asm/pgtable.h +++ b/arch/microblaze/include/asm/pgtable.h @@ -399,6 +399,9 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd) return ((unsigned long) (pmd_val(pmd) & PAGE_MASK)); } +/* returns pfn of the pmd entry*/ +#define pmd_pfn(pmd) (__pa(pmd_val(pmd)) >> PAGE_SHIFT) + /* returns struct *page of the pmd entry*/ #define pmd_page(pmd) (pfn_to_page(__pa(pmd_val(pmd)) >> PAGE_SHIFT)) -- cgit v1.2.3