aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/book3s64/radix_pgtable.c
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2021-10-14 08:04:38 +1030
committerMichael Ellerman <mpe@ellerman.id.au>2021-10-22 15:22:02 +1100
commit4f703e7faa67a116016c4678fc88b507c12670c9 (patch)
tree29b21d3ba6945f30efd81ef52076fc1708774ba4 /arch/powerpc/mm/book3s64/radix_pgtable.c
parentpowerpc: Mark .opd section read-only (diff)
downloadlinux-dev-4f703e7faa67a116016c4678fc88b507c12670c9.tar.xz
linux-dev-4f703e7faa67a116016c4678fc88b507c12670c9.zip
powerpc/s64: Clarify that radix lacks DEBUG_PAGEALLOC
The page_alloc.c code will call into __kernel_map_pages() when DEBUG_PAGEALLOC is configured and enabled. As the implementation assumes hash, this should crash spectacularly if not for a bit of luck in __kernel_map_pages(). In this function linear_map_hash_count is always zero, the for loop exits without doing any damage. There are no other platforms that determine if they support debug_pagealloc at runtime. Instead of adding code to mm/page_alloc.c to do that, this change turns the map/unmap into a noop when in radix mode and prints a warning once. Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu> [mpe: Reformat if per Christophe's suggestion] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211013213438.675095-1-joel@jms.id.au
Diffstat (limited to '')
-rw-r--r--arch/powerpc/mm/book3s64/radix_pgtable.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index ae20add7954a..3a600bd7fbc6 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -920,6 +920,13 @@ void __meminit radix__vmemmap_remove_mapping(unsigned long start, unsigned long
#endif
#endif
+#ifdef CONFIG_DEBUG_PAGEALLOC
+void radix__kernel_map_pages(struct page *page, int numpages, int enable)
+{
+ pr_warn_once("DEBUG_PAGEALLOC not supported in radix mode\n");
+}
+#endif
+
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
unsigned long radix__pmd_hugepage_update(struct mm_struct *mm, unsigned long addr,