summaryrefslogtreecommitdiff
path: root/include/linux/node.h
diff options
context:
space:
mode:
authorDonet Tom <donettom@linux.ibm.com>2025-05-28 20:18:02 +0300
committerAndrew Morton <akpm@linux-foundation.org>2025-07-10 08:41:59 +0300
commitac24f6cd87d88150fc6c1fef904794571f62dc5e (patch)
tree82a601a721f7c904db130a58fe1760264c646e41 /include/linux/node.h
parent69e944b1606a0b6ba4663dc4fd9f43c2b85cdf54 (diff)
downloadlinux-ac24f6cd87d88150fc6c1fef904794571f62dc5e.tar.xz
drivers/base/node: remove register_memory_blocks_under_node() function call from register_one_node
register_one_node() is now only called via cpu_up() → __try_online_node() during CPU hotplug operations to online a node. At this stage, the node has not yet had any memory added. As a result, there are no memory blocks to walk or register, so calling register_memory_blocks_under_node() is unnecessary. Therefore, the call to register_memory_blocks_under_node() has been removed from register_one_node(). Link: https://lkml.kernel.org/r/ecf07075b1a41015fcf58823997d5c2ed7b8c18f.1748452242.git.donettom@linux.ibm.com Signed-off-by: Donet Tom <donettom@linux.ibm.com> Acked-by: Oscar Salvador <osalvador@suse.de> Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org> Acked-by: David Hildenbrand <david@redhat.com> Cc: Zi Yan <ziy@nvidia.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/node.h')
-rw-r--r--include/linux/node.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/include/linux/node.h b/include/linux/node.h
index 485370f3bc17..b15de78e0408 100644
--- a/include/linux/node.h
+++ b/include/linux/node.h
@@ -134,21 +134,7 @@ extern int __register_one_node(int nid);
/* Registers an online node */
static inline int register_one_node(int nid)
{
- int error = 0;
-
- if (node_online(nid)) {
- struct pglist_data *pgdat = NODE_DATA(nid);
- unsigned long start_pfn = pgdat->node_start_pfn;
- unsigned long end_pfn = start_pfn + pgdat->node_spanned_pages;
-
- error = __register_one_node(nid);
- if (error)
- return error;
- register_memory_blocks_under_node(nid, start_pfn, end_pfn,
- MEMINIT_EARLY);
- }
-
- return error;
+ return __register_one_node(nid);
}
extern void unregister_one_node(int nid);