mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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 |
||
|---|---|---|
| .. | ||
| hash_4k.c | ||
| hash_64k.c | ||
| hash_hugepage.c | ||
| hash_hugetlbpage.c | ||
| hash_native.c | ||
| hash_pgtable.c | ||
| hash_tlb.c | ||
| hash_utils.c | ||
| internal.h | ||
| iommu_api.c | ||
| Makefile | ||
| mmu_context.c | ||
| pgtable.c | ||
| pkeys.c | ||
| radix_hugetlbpage.c | ||
| radix_pgtable.c | ||
| radix_tlb.c | ||
| slb.c | ||
| subpage_prot.c | ||