summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMuchun Song <songmuchun@bytedance.com>2026-09-10 14:32:50 +0800
committerAndrew Morton <akpm@linux-foundation.org>2026-10-06 17:38:51 -0700
commit328649715319855cf16dd7b6aaecb8c44eef4240 (patch)
tree84ea5b4d6d231fe5cb868a82db1201007da91610 /include/linux
parentb8abb1c0c40f1f82e8dbd7986a531d5229e62f01 (diff)
mm/sparse-vmemmap: remove SPARSEMEM_VMEMMAP_PREINIT support
SPARSEMEM_VMEMMAP_PREINIT existed only to support HugeTLB's early vmemmap optimization setup. Now that HugeTLB bootmem vmemmap optimization uses the common section-based sparse-vmemmap path, the sparse initialization code no longer needs a separate pre-initialization mechanism for vmemmap population. Remove the related Kconfig symbols, section flag, and empty early hook, so present sections always go through the normal sparse setup path. Link: https://lore.kernel.org/20260910063256.64386-12-songmuchun@bytedance.com Signed-off-by: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Acked-by: Qi Zheng <qi.zheng@linux.dev> Acked-by: David Hildenbrand (Arm) <david@kernel.org> Cc: David Laight <david.laight.linux@gmail.com> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Suren Baghdasaryan <surenb@google.com> Cc: Vlastimil Babka <vbabka@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmzone.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 2c4f63e379da..f2d39a888eac 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -2096,9 +2096,6 @@ enum {
#ifdef CONFIG_ZONE_DEVICE
SECTION_TAINT_ZONE_DEVICE_BIT,
#endif
-#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
- SECTION_IS_VMEMMAP_PREINIT_BIT,
-#endif
SECTION_MAP_LAST_BIT,
};
@@ -2109,9 +2106,6 @@ enum {
#ifdef CONFIG_ZONE_DEVICE
#define SECTION_TAINT_ZONE_DEVICE BIT(SECTION_TAINT_ZONE_DEVICE_BIT)
#endif
-#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
-#define SECTION_IS_VMEMMAP_PREINIT BIT(SECTION_IS_VMEMMAP_PREINIT_BIT)
-#endif
#define SECTION_MAP_MASK (~(BIT(SECTION_MAP_LAST_BIT) - 1))
#define SECTION_NID_SHIFT SECTION_MAP_LAST_BIT
@@ -2166,24 +2160,6 @@ static inline int online_device_section(const struct mem_section *section)
}
#endif
-#ifdef CONFIG_SPARSEMEM_VMEMMAP_PREINIT
-static inline int preinited_vmemmap_section(const struct mem_section *section)
-{
- return (section &&
- (section->section_mem_map & SECTION_IS_VMEMMAP_PREINIT));
-}
-
-void sparse_vmemmap_init_nid_early(int nid);
-#else
-static inline int preinited_vmemmap_section(const struct mem_section *section)
-{
- return 0;
-}
-static inline void sparse_vmemmap_init_nid_early(int nid)
-{
-}
-#endif
-
static inline int online_section_nr(unsigned long nr)
{
return online_section(__nr_to_section(nr));
@@ -2385,7 +2361,6 @@ static inline unsigned long next_present_section_nr(unsigned long section_nr)
#endif
#else
-#define sparse_vmemmap_init_nid_early(_nid) do {} while (0)
#define pfn_in_present_section pfn_valid
#endif /* CONFIG_SPARSEMEM */