arch_numa: remove setup_node_data()
PATCH 1/1 arch_numa: remove setup_node_data()
setup_node_data() sets node_id, node_start_pfn and node_spanned_pages of the node data it allocates. free_area_init_node() sets these fields again in mm_core_init_early(), and nothing reads them in between.
So remove setup_node_data() and call alloc_node_data() directly. Also remove the log for memoryless nodes, because free_area_init_node() prints the same information.
No functional change.
--- mm/arch_numa.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-)
mm/arch_numa.c +1 -19
@@ -201,21 +201,6 @@ void __init setup_per_cpu_areas(void) }#endif -/* -* Initialize NODE_DATA for a node on the local memory -*/ -static void __init setup_node_data (int nid,u64 start_pfn,u64 end_pfn) -{ -if (start_pfn >= end_pfn) -pr_info ("Initmem setup node %d [<memory-less node>]\n" , nid); - -alloc_node_data (nid); - -NODE_DATA (nid)->node_id = nid; -NODE_DATA (nid)->node_start_pfn = start_pfn; -NODE_DATA (nid)->node_spanned_pages = end_pfn - start_pfn; -} -static int __init numa_register_nodes (void ) {int nid;
@@ -226,10 +211,7 @@ static int __init numa_register_nodes(void)/* Finally register nodes. */ for_each_node_mask (nid, numa_nodes_parsed) { -unsigned long start_pfn, end_pfn; - -get_pfn_range_for_nid (nid, &start_pfn, &end_pfn); -setup_node_data (nid, start_pfn, end_pfn); +alloc_node_data (nid);node_set_online (nid); }
Signature · 1 line
2.43.0
Quoted 9 lines · Sang-Heon Jeon
setup_node_data()setsnode_id,node_start_pfnandnode_spanned_pagesof the node data it allocates.free_area_init_node()sets these fields again inmm_core_init_early(), and nothing reads them in between.So remove
setup_node_data()and callalloc_node_data()directly. Also remove the log for memoryless nodes, becausefree_area_init_node()prints the same information.[...]
Applied to for-next branch of memblock.git tree, thanks!
[1/1] arch_numa: remove setup_node_data()
commit: 067dac36cef09331f79c1c5d21e4fd9473676fc1
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mm/memblock
branch: for-next
--
Sincerely yours,
Mike.