aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <[email protected]>2024-05-29 09:42:05 +0200
committerMike Rapoport (IBM) <[email protected]>2024-06-06 22:20:39 +0300
commit3ac36aa7307363b7247ccb6f6a804e11496b2b36 (patch)
tree8a436c15b4ca433968134a56ef6f2e10b24dd5e6
parente0eec24e2e199873f43df99ec39773ad3af2bff7 (diff)
x86/mm/numa: Use NUMA_NO_NODE when calling memblock_set_node()
memblock_set_node() warns about using MAX_NUMNODES, see e0eec24e2e19 ("memblock: make memblock_set_node() also warn about use of MAX_NUMNODES") for details. Reported-by: Narasimhan V <[email protected]> Signed-off-by: Jan Beulich <[email protected]> Cc: [email protected] [bp: commit message] Signed-off-by: Borislav Petkov (AMD) <[email protected]> Reviewed-by: Mike Rapoport (IBM) <[email protected]> Tested-by: Paul E. McKenney <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mike Rapoport (IBM) <[email protected]>
-rw-r--r--arch/x86/mm/numa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index ce84ba86e69e..6ce10e3c6228 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -493,7 +493,7 @@ static void __init numa_clear_kernel_node_hotplug(void)
for_each_reserved_mem_region(mb_region) {
int nid = memblock_get_region_node(mb_region);
- if (nid != MAX_NUMNODES)
+ if (nid != NUMA_NO_NODE)
node_set(nid, reserved_nodemask);
}
@@ -614,9 +614,9 @@ static int __init numa_init(int (*init_func)(void))
nodes_clear(node_online_map);
memset(&numa_meminfo, 0, sizeof(numa_meminfo));
WARN_ON(memblock_set_node(0, ULLONG_MAX, &memblock.memory,
- MAX_NUMNODES));
+ NUMA_NO_NODE));
WARN_ON(memblock_set_node(0, ULLONG_MAX, &memblock.reserved,
- MAX_NUMNODES));
+ NUMA_NO_NODE));
/* In case that parsing SRAT failed. */
WARN_ON(memblock_clear_hotplug(0, ULLONG_MAX));
numa_reset_distance();