]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
powerpc: mm: add pud_pfn() stub
authorRohan McLure <rmclure@linux.ibm.com>
Wed, 13 Aug 2025 06:26:11 +0000 (16:26 +1000)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 18 Aug 2025 05:08:56 +0000 (22:08 -0700)
The page table check feature requires that pud_pfn() be defined on each
consuming architecture.  Since only 64-bit, Book3S platforms allow for
hugepages at this upper level, and since the calling code is gated by a
call to pud_user_accessible_page(), which will return zero, include this
stub as a BUILD_BUG().

Link: https://lkml.kernel.org/r/20250813062614.51759-11-ajd@linux.ibm.com
Signed-off-by: Rohan McLure <rmclure@linux.ibm.com>
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Acked-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Nicholas Miehlbradt <nicholas@linux.ibm.com>
Cc: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/powerpc/include/asm/pgtable.h

index 93d77ad5a92fa44f8a08a68baaf2d36950654ae0..0f73a9ade0ed4edb9026bd1775cc35fb29545481 100644 (file)
@@ -214,6 +214,15 @@ static inline bool arch_supports_memmap_on_memory(unsigned long vmemmap_size)
 
 #endif /* CONFIG_PPC64 */
 
+#ifndef pud_pfn
+#define pud_pfn pud_pfn
+static inline int pud_pfn(pud_t pud)
+{
+       BUILD_BUG();
+       return 0;
+}
+#endif
+
 #endif /* __ASSEMBLY__ */
 
 #endif /* _ASM_POWERPC_PGTABLE_H */