From ea963eab118b41f6ff2dcc4a8b0f43de375473b1 Mon Sep 17 00:00:00 2001 From: "David Hildenbrand (Arm)" Date: Thu, 16 Jul 2026 16:51:06 +0200 Subject: [PATCH] x86/mm: remove CONFIG_HAVE_BOOTMEM_INFO_NODE CONFIG_HAVE_BOOTMEM_INFO_NODE now essentially doesn't do anything. So let's remove support for CONFIG_HAVE_BOOTMEM_INFO_NODE. Link: https://lore.kernel.org/20260716-bootmem_info_part2-v2-7-4afc76c73d61@kernel.org Signed-off-by: David Hildenbrand (Arm) Reviewed-by: Mike Rapoport (Microsoft) Reviewed-by: Dave Hansen Cc: Alexander Gordeev Cc: Andy Lutomirski Cc: "Borislav Petkov (AMD)" Cc: Brendan Jackman Cc: Brendan Jackman Cc: Christian Borntraeger Cc: Gerald Schaefer Cc: Heiko Carstens Cc: "H. Peter Anvin" Cc: Ingo Molnar Cc: Johannes Weiner Cc: Liam R. Howlett Cc: Lorenzo Stoakes Cc: Michal Hocko Cc: Muchun Song Cc: Oscar Salvador Cc: Peter Zijlstra Cc: Suren Baghdasaryan Cc: Sven Schnelle Cc: Vasily Gorbik Cc: Vlastimil Babka Cc: Zi Yan Signed-off-by: Andrew Morton --- arch/x86/mm/init_64.c | 26 -------------------------- mm/Kconfig | 1 - 2 files changed, 27 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 1b17dcf781e6..ab4c5a02326f 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -1286,16 +1285,6 @@ void __ref arch_remove_memory(u64 start, u64 size, struct vmem_altmap *altmap, static struct kcore_list kcore_vsyscall; -static void __init register_page_bootmem_info(void) -{ -#if defined(CONFIG_NUMA) || defined(CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP) - int i; - - for_each_online_node(i) - register_page_bootmem_info_node(NODE_DATA(i)); -#endif -} - /* * Pre-allocates page-table pages for the vmalloc area in the kernel page-table. * Only the level which needs to be synchronized between all page-tables is @@ -1358,14 +1347,6 @@ void __init mem_init(void) after_bootmem = 1; x86_init.hyper.init_after_bootmem(); - /* - * Must be done after boot memory is put on freelist, because here we - * might set fields in deferred struct pages that have not yet been - * initialized, and memblock_free_all() initializes all the reserved - * deferred pages for us. - */ - register_page_bootmem_info(); - /* Register memory areas for /proc/kcore */ if (get_gate_vma(&init_mm)) kclist_add(&kcore_vsyscall, (void *)VSYSCALL_ADDR, PAGE_SIZE, KCORE_USER); @@ -1564,13 +1545,6 @@ int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node, return err; } -#ifdef CONFIG_HAVE_BOOTMEM_INFO_NODE -void register_page_bootmem_memmap(unsigned long section_nr, - struct page *start_page, unsigned long nr_pages) -{ -} -#endif - void __meminit vmemmap_populate_print_last(void) { if (p_start) { diff --git a/mm/Kconfig b/mm/Kconfig index 4ea070f5664a..6b3430ff8788 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -590,7 +590,6 @@ endchoice config MEMORY_HOTREMOVE bool "Allow for memory hot remove" - select HAVE_BOOTMEM_INFO_NODE if X86_64 depends on MEMORY_HOTPLUG select MIGRATION