[PATCH v2 11/13] mm/sparse: remove flags parameter from sparse_init_one_section()

From: David Hildenbrand (Arm)

Date: Mon Sep 21 2026 - 16:08:50 EST


The last user of the flags parameter that used to pass SECTION_IS_EARLY
was removed, so let's remove the parameter.

Acked-by: Oscar Salvador <osalvador@xxxxxxx>
Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
Signed-off-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
---
mm/sparse-vmemmap.c | 2 +-
mm/sparse.c | 2 +-
mm/sparse.h | 5 ++---
3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c
index f0db433e0f10b..3267f9362c68b 100644
--- a/mm/sparse-vmemmap.c
+++ b/mm/sparse-vmemmap.c
@@ -869,7 +869,7 @@ int __meminit sparse_add_section(int nid, unsigned long start_pfn,
/* Align memmap to section boundary in the subsection case */
if (section_nr_to_pfn(section_nr) != start_pfn)
memmap = pfn_to_page(section_nr_to_pfn(section_nr));
- sparse_init_one_section(ms, section_nr, memmap, ms->usage, 0);
+ sparse_init_one_section(ms, section_nr, memmap, ms->usage);

return 0;
}
diff --git a/mm/sparse.c b/mm/sparse.c
index 5d2d9f95d4024..702904b417006 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -243,7 +243,7 @@ static void __init sparse_metadata_init_nid(int nid,
section_nr);
memmap_boot_pages_add(section_nr_vmemmap_pages(pfn, PAGES_PER_SECTION));
sparse_init_one_section(__nr_to_section(section_nr), section_nr,
- mem_map, usage, 0);
+ mem_map, usage);
usage = (void *)usage + mem_section_usage_size();
}
}
diff --git a/mm/sparse.h b/mm/sparse.h
index 19664d702af84..fdbc4cacf91d1 100644
--- a/mm/sparse.h
+++ b/mm/sparse.h
@@ -21,7 +21,7 @@ int sparse_index_init(unsigned long section_nr, int nid);

static inline void sparse_init_one_section(struct mem_section *ms,
unsigned long section_nr, struct page *mem_map,
- struct mem_section_usage *usage, unsigned long flags)
+ struct mem_section_usage *usage)
{
unsigned long coded_mem_map;

@@ -37,8 +37,7 @@ static inline void sparse_init_one_section(struct mem_section *ms,
VM_WARN_ON_ONCE(coded_mem_map & ~SECTION_MAP_MASK);

ms->section_mem_map &= ~SECTION_MAP_MASK;
- ms->section_mem_map |= coded_mem_map;
- ms->section_mem_map |= flags | SECTION_HAS_MEM_MAP;
+ ms->section_mem_map |= coded_mem_map | SECTION_HAS_MEM_MAP;
ms->usage = usage;
}


--
2.43.0