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/[email protected]
Signed-off-by: Muchun Song <[email protected]>
Acked-by: Mike Rapoport (Microsoft) <[email protected]>
Cc: "Aneesh Kumar K.V" <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Frank van der Linden <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Madhavan Srinivasan <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Oscar Salvador <[email protected]>
Cc: Oscar Salvador (SUSE) <[email protected]>
Cc: "Ritesh Harjani (IBM)" <[email protected]>
Cc: Usama Arif <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
This commit is contained in:
Muchun Song authored and Andrew Morton committed 2026-07-28 21:12:00 -07:00
1 parent 4753a8220a
commit ec1adc14c1
5 files changed
-28

No files matched your search

-7
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 */
-4
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[] = {
-5
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;
-11
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,
-1
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);
}
/*