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/csky/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/csky/include') diff --git a/arch/csky/include/asm/pgtable.h b/arch/csky/include/asm/pgtable.h index 151607ed5158..bbe245117777 100644 --- a/arch/csky/include/asm/pgtable.h +++ b/arch/csky/include/asm/pgtable.h @@ -30,6 +30,7 @@ #define pgd_ERROR(e) \ pr_err("%s:%d: bad pgd %08lx.\n", __FILE__, __LINE__, pgd_val(e)) +#define pmd_pfn(pmd) (pmd_phys(pmd) >> PAGE_SHIFT) #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT)) #define pte_clear(mm, addr, ptep) set_pte((ptep), \ (((unsigned int) addr >= PAGE_OFFSET) ? __pte(_PAGE_GLOBAL) : __pte(0))) -- cgit v1.2.3