aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/include/asm/sun3_pgtable.h
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2022-02-04 13:49:20 -0500
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 12:59:02 -0400
commit7106c51ee9a1b65eff63496636fce36bf246c1a0 (patch)
tree7532d39eed0764ff0b0d1369262272c320dc4b30 /arch/m68k/include/asm/sun3_pgtable.h
parentmm: Add DEFINE_PAGE_VMA_WALK and DEFINE_FOLIO_VMA_WALK (diff)
downloadlinux-dev-7106c51ee9a1b65eff63496636fce36bf246c1a0.tar.xz
linux-dev-7106c51ee9a1b65eff63496636fce36bf246c1a0.zip
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 <rppt@linux.ibm.com> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Diffstat (limited to 'arch/m68k/include/asm/sun3_pgtable.h')
-rw-r--r--arch/m68k/include/asm/sun3_pgtable.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/m68k/include/asm/sun3_pgtable.h b/arch/m68k/include/asm/sun3_pgtable.h
index 5b24283a0a42..5e4e753f0d24 100644
--- a/arch/m68k/include/asm/sun3_pgtable.h
+++ b/arch/m68k/include/asm/sun3_pgtable.h
@@ -130,6 +130,7 @@ static inline void pte_clear (struct mm_struct *mm, unsigned long addr, pte_t *p
({ pte_t __pte; pte_val(__pte) = pfn | pgprot_val(pgprot); __pte; })
#define pte_page(pte) virt_to_page(__pte_page(pte))
+#define pmd_pfn(pmd) (pmd_val(pmd) >> PAGE_SHIFT)
#define pmd_page(pmd) virt_to_page(pmd_page_vaddr(pmd))