[merged mm-stable] mm-sparse-move-sparse_vmemmap_init_nid_late-into-sparse_init_nid.patch removed from -mm tree

Andrew Morton <[email protected]> Tue, 28 Jul 2026 21:14:26 -0700
Newsgroups org.kernel.vger.mm-commits
Message-ID <[email protected]>
The quilt patch titled
     Subject: mm/sparse: move sparse_vmemmap_init_nid_late() into sparse_init_nid()
has been removed from the -mm tree.  Its filename was
     mm-sparse-move-sparse_vmemmap_init_nid_late-into-sparse_init_nid.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 sparse_vmemmap_init_nid_late() into sparse_init_nid()
Date: Fri, 12 Jun 2026 11:58:55 +0800

sparse_vmemmap_init_nid_late() is still called separately from
mm_core_init_early(), away from the rest of the sparse initialization
path.

Now that sparse_init() runs after zone initialization, call
sparse_vmemmap_init_nid_late() from sparse_init_nid() instead.  This keeps
both sparse_vmemmap_init_nid_early() and sparse_vmemmap_init_nid_late() in
the sparse setup path.

Link: https://lore.kernel.org/[email protected]
Signed-off-by: Muchun Song <[email protected]>
Reviewed-by: Mike Rapoport (Microsoft) <[email protected]>
Reviewed-by: Oscar Salvador (SUSE) <[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: "Ritesh Harjani (IBM)" <[email protected]>
Cc: Usama Arif <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 mm/mm_init.c |    4 ----
 mm/sparse.c  |    1 +
 2 files changed, 1 insertion(+), 4 deletions(-)

--- a/mm/mm_init.c~mm-sparse-move-sparse_vmemmap_init_nid_late-into-sparse_init_nid
+++ a/mm/mm_init.c
@@ -2681,16 +2681,12 @@ void __init __weak mem_init(void)
 
 void __init mm_core_init_early(void)
 {
-	int nid;
-
 	free_area_init();
 
 	hugetlb_cma_reserve();
 	hugetlb_bootmem_alloc();
 
 	sparse_init();
-	for_each_node_state(nid, N_MEMORY)
-		sparse_vmemmap_init_nid_late(nid);
 	memmap_init();
 }
 
--- a/mm/sparse.c~mm-sparse-move-sparse_vmemmap_init_nid_late-into-sparse_init_nid
+++ a/mm/sparse.c
@@ -320,6 +320,7 @@ static void __init sparse_init_nid(int n
 		}
 	}
 	sparse_usage_fini();
+	sparse_vmemmap_init_nid_late(nid);
 }
 
 /*
_

Patches currently in -mm which might be from [email protected] are

selftests-mm-remove-obsolete-hugetlb-vmemmap-test.patch