[merged mm-stable] mm-sparse-move-subsection_map_init-into-sparse_init.patch removed from -mm tree
Andrew Morton <[email protected]> Tue, 28 Jul 2026 21:14:21 -0700
| Newsgroups | org.kernel.vger.mm-commits |
|---|---|
| Message-ID | <[email protected]> |
The quilt patch titled
Subject: mm/sparse: move subsection_map_init() into sparse_init()
has been removed from the -mm tree. Its filename was
mm-sparse-move-subsection_map_init-into-sparse_init.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Muchun Song <[email protected]>
Subject: mm/sparse: move subsection_map_init() into sparse_init()
Date: Fri, 12 Jun 2026 11:58:51 +0800
subsection_map_init() is part of sparse memory initialization, but it is
currently called from free_area_init().
Move it into sparse_init() so the sparse-specific setup stays together
instead of being split across the generic free_area_init() path.
Link: https://lore.kernel.org/[email protected]
Signed-off-by: Muchun Song <[email protected]>
Acked-by: Mike Rapoport (Microsoft) <[email protected]>
Acked-by: Oscar Salvador <[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 (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]>
---
mm/internal.h | 5 ++---
mm/mm_init.c | 10 ++--------
mm/sparse-vmemmap.c | 11 ++++++++++-
mm/sparse.c | 1 +
4 files changed, 15 insertions(+), 12 deletions(-)
--- a/mm/internal.h~mm-sparse-move-subsection_map_init-into-sparse_init
+++ a/mm/internal.h
@@ -994,10 +994,9 @@ static inline void sparse_init(void) {}
* mm/sparse-vmemmap.c
*/
#ifdef CONFIG_SPARSEMEM_VMEMMAP
-void sparse_init_subsection_map(unsigned long pfn, unsigned long nr_pages);
+void sparse_init_subsection_map(void);
#else
-static inline void sparse_init_subsection_map(unsigned long pfn,
- unsigned long nr_pages)
+static inline void sparse_init_subsection_map(void)
{
}
#endif /* CONFIG_SPARSEMEM_VMEMMAP */
--- a/mm/mm_init.c~mm-sparse-move-subsection_map_init-into-sparse_init
+++ a/mm/mm_init.c
@@ -1871,18 +1871,12 @@ static void __init free_area_init(void)
(u64)zone_movable_pfn[i] << PAGE_SHIFT);
}
- /*
- * Print out the early node map, and initialize the
- * subsection-map relative to active online memory ranges to
- * enable future "sub-section" extensions of the memory map.
- */
+ /* Print out the early node map. */
pr_info("Early memory node ranges\n");
- for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid) {
+ for_each_mem_pfn_range(i, MAX_NUMNODES, &start_pfn, &end_pfn, &nid)
pr_info(" node %3d: [mem %#018Lx-%#018Lx]\n", nid,
(u64)start_pfn << PAGE_SHIFT,
((u64)end_pfn << PAGE_SHIFT) - 1);
- sparse_init_subsection_map(start_pfn, end_pfn - start_pfn);
- }
/* Initialise every node */
mminit_verify_pageflags_layout();
--- a/mm/sparse.c~mm-sparse-move-subsection_map_init-into-sparse_init
+++ a/mm/sparse.c
@@ -361,5 +361,6 @@ void __init sparse_init(void)
}
/* cover the last node */
sparse_init_nid(nid_begin, pnum_begin, pnum_end, map_count);
+ sparse_init_subsection_map();
vmemmap_populate_print_last();
}
--- a/mm/sparse-vmemmap.c~mm-sparse-move-subsection_map_init-into-sparse_init
+++ a/mm/sparse-vmemmap.c
@@ -603,7 +603,7 @@ static void subsection_mask_set(unsigned
bitmap_set(map, idx, end - idx + 1);
}
-void __init sparse_init_subsection_map(unsigned long pfn, unsigned long nr_pages)
+static void __init sparse_init_subsection_map_range(unsigned long pfn, unsigned long nr_pages)
{
int end_sec_nr = pfn_to_section_nr(pfn + nr_pages - 1);
unsigned long nr, start_sec_nr = pfn_to_section_nr(pfn);
@@ -626,6 +626,15 @@ void __init sparse_init_subsection_map(u
}
}
+void __init sparse_init_subsection_map(void)
+{
+ int i, nid;
+ unsigned long start, end;
+
+ for_each_mem_pfn_range(i, MAX_NUMNODES, &start, &end, &nid)
+ sparse_init_subsection_map_range(start, end - start);
+}
+
#ifdef CONFIG_MEMORY_HOTPLUG
/* Mark all memory sections within the pfn range as online */
_
Patches currently in -mm which might be from [email protected] are
selftests-mm-remove-obsolete-hugetlb-vmemmap-test.patch