mm/sparse-vmemmap: remove sparse_vmemmap_init_nid_late()

hugetlb_vmemmap_init_late() no longer has any users, so the remaining
late-init path in sparse_vmemmap_init_nid_late() is dead code.

Remove sparse_vmemmap_init_nid_late() and its declarations.

Link: https://lore.kernel.org/20260612035903.2468601-18-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: David Hildenbrand <david@kernel.org>
Cc: Frank van der Linden <fvdl@google.com>
Cc: Liam R. Howlett <liam@infradead.org>
Cc: Lorenzo Stoakes <ljs@kernel.org>
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Oscar Salvador (SUSE) <osalvador@kernel.org>
Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>
Cc: Usama Arif <usama.arif@linux.dev>
Cc: Vlastimil Babka <vbabka@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Muchun Song 2026-06-12 11:59:01 +08:00 committed by Andrew Morton
parent 4753a8220a
commit ec1adc14c1
5 changed files with 0 additions and 28 deletions

View File

@ -2156,8 +2156,6 @@ static inline int preinited_vmemmap_section(const struct mem_section *section)
}
void sparse_vmemmap_init_nid_early(int nid);
void sparse_vmemmap_init_nid_late(int nid);
#else
static inline int preinited_vmemmap_section(const struct mem_section *section)
{
@ -2166,10 +2164,6 @@ static inline int preinited_vmemmap_section(const struct mem_section *section)
static inline void sparse_vmemmap_init_nid_early(int nid)
{
}
static inline void sparse_vmemmap_init_nid_late(int nid)
{
}
#endif
static inline int online_section_nr(unsigned long nr)
@ -2374,7 +2368,6 @@ static inline unsigned long next_present_section_nr(unsigned long section_nr)
#else
#define sparse_vmemmap_init_nid_early(_nid) do {} while (0)
#define sparse_vmemmap_init_nid_late(_nid) do {} while (0)
#define pfn_in_present_section pfn_valid
#endif /* CONFIG_SPARSEMEM */

View File

@ -808,10 +808,6 @@ void __init hugetlb_vmemmap_init_early(int nid)
m->flags |= HUGE_BOOTMEM_HVO;
}
}
void __init hugetlb_vmemmap_init_late(int nid)
{
}
#endif
static const struct ctl_table hugetlb_vmemmap_sysctls[] = {

View File

@ -29,7 +29,6 @@ void hugetlb_vmemmap_optimize_folios(struct hstate *h, struct list_head *folio_l
void hugetlb_vmemmap_optimize_bootmem_folios(struct hstate *h, struct list_head *folio_list);
#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
void hugetlb_vmemmap_init_early(int nid);
void hugetlb_vmemmap_init_late(int nid);
#endif
@ -81,10 +80,6 @@ static inline void hugetlb_vmemmap_init_early(int nid)
{
}
static inline void hugetlb_vmemmap_init_late(int nid)
{
}
static inline unsigned int hugetlb_vmemmap_optimizable_size(const struct hstate *h)
{
return 0;

View File

@ -581,17 +581,6 @@ void __init sparse_vmemmap_init_nid_early(int nid)
{
hugetlb_vmemmap_init_early(nid);
}
/*
* This is called just before the initialization of page structures
* through memmap_init. Zones are now initialized, so any work that
* needs to be done that needs zone information can be done from
* here.
*/
void __init sparse_vmemmap_init_nid_late(int nid)
{
hugetlb_vmemmap_init_late(nid);
}
#endif
static void subsection_mask_set(unsigned long *map, unsigned long pfn,

View File

@ -320,7 +320,6 @@ static void __init sparse_init_nid(int nid, unsigned long pnum_begin,
}
}
sparse_usage_fini();
sparse_vmemmap_init_nid_late(nid);
}
/*