mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 15:43:08 -04:00
mm/sparse: move sparse_vmemmap_init_nid_late() into sparse_init_nid()
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/20260612035903.2468601-12-songmuchun@bytedance.com Signed-off-by: Muchun Song <songmuchun@bytedance.com> Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Reviewed-by: Oscar Salvador (SUSE) <osalvador@kernel.org> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> Cc: David Hildenbrand <david@kernel.org> Cc: Frank van der Linden <fvdl@google.com> Cc: Liam R. Howlett <liam@infradead.org> Cc: Lorenzo Stoakes <ljs@kernel.org> Cc: Madhavan Srinivasan <maddy@linux.ibm.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com> Cc: Usama Arif <usama.arif@linux.dev> Cc: Vlastimil Babka <vbabka@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
37424eab6d
commit
133b57fee9
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -320,6 +320,7 @@ static void __init sparse_init_nid(int nid, unsigned long pnum_begin,
|
||||
}
|
||||
}
|
||||
sparse_usage_fini();
|
||||
sparse_vmemmap_init_nid_late(nid);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user