From: "Borislav Petkov (AMD)" <[email protected]>
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: Borislav Petkov (AMD) <[email protected]>
---
arch/x86/mm/numa.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index ce84ba86e69e..b44a3ae51e9a 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -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();
--
2.43.0
On Mon, Jun 03, 2024 at 04:10:05PM +0200, Borislav Petkov wrote:
> From: "Borislav Petkov (AMD)" <[email protected]>
>
> 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: Borislav Petkov (AMD) <[email protected]>
Reviewed-by: Mike Rapoport (IBM) <[email protected]>
> ---
> arch/x86/mm/numa.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
> index ce84ba86e69e..b44a3ae51e9a 100644
> --- a/arch/x86/mm/numa.c
> +++ b/arch/x86/mm/numa.c
> @@ -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();
> --
> 2.43.0
>
--
Sincerely yours,
Mike.
From: Mike Rapoport (IBM) <[email protected]>
On Mon, 03 Jun 2024 16:10:05 +0200, Borislav Petkov wrote:
> memblock_set_node() warns about using MAX_NUMNODES, see
>
> e0eec24e2e19 ("memblock: make memblock_set_node() also warn about use of MAX_NUMNODES")
>
> for details.
>
>
> [...]
Applied to fixes branch of memblock.git tree, thanks!
[1/1] x86/mm/numa: Use NUMA_NO_NODE when calling memblock_set_node()
commit: c55f3cc2d9f241d6e45336fd48dafa755c012297
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
branch: fixes
--
Sincerely yours,
Mike.
On Tue, Jun 04, 2024 at 04:16:57PM +0300, Mike Rapoport wrote:
> On Mon, 03 Jun 2024 16:10:05 +0200, Borislav Petkov wrote:
> > memblock_set_node() warns about using MAX_NUMNODES, see
> >
> > e0eec24e2e19 ("memblock: make memblock_set_node() also warn about use of MAX_NUMNODES")
> >
> > for details.
> >
> >
> > [...]
>
> Applied to fixes branch of memblock.git tree, thanks!
>
> [1/1] x86/mm/numa: Use NUMA_NO_NODE when calling memblock_set_node()
> commit: c55f3cc2d9f241d6e45336fd48dafa755c012297
>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
> branch: fixes
There was a similar, but better fix from Jan Beulich:
https://lore.kernel.org/lkml/[email protected]/
that also updated numa_clear_kernel_node_hotplug().
I'm going to replace this patch with his and use Boris' changelog as more
appropriate.
> --
> Sincerely yours,
> Mike.
>
--
Sincerely yours,
Mike.