[PATCH] powerpc/pseries/cpuhp: fix non-NUMA build

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1821d

3 messages, 2 authors, 2021-08-16 · open the first message on its own page

[PATCH] powerpc/pseries/cpuhp: fix non-NUMA build

From: Nathan Lynch <hidden>
Date: 2021-08-16 15:18:01

With CONFIG_NUMA unset, direct references to node_to_cpumask_map don't
work:

   arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':
quoted
arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared (first use in this
function)
    1022 |        node_to_cpumask_map[node]);
	 |        ^~~~~~~~~~~~~~~~~~~

Use cpumask_of_node() here instead.

Fixes: bd1dd4c5f528 ("powerpc/pseries: Prevent free CPU ids being reused on another node")
Reported-by: kernel test robot <redacted>
Signed-off-by: Nathan Lynch <redacted>
---
 arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 1ef40ef699a6..d646c22e94ab 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -1021,7 +1021,7 @@ static int __init pseries_cpu_hotplug_init(void)
 			/* Record ids of CPU added at boot time */
 			cpumask_or(node_recorded_ids_map[node],
 				   node_recorded_ids_map[node],
-				   node_to_cpumask_map[node]);
+				   cpumask_of_node(node));
 		}
 
 		of_reconfig_notifier_register(&pseries_smp_nb);
-- 
2.31.1

Re: [PATCH] powerpc/pseries/cpuhp: fix non-NUMA build

From: Christophe Leroy <hidden>
Date: 2021-08-16 15:20:41

Le 16/08/2021 à 17:17, Nathan Lynch a écrit :
With CONFIG_NUMA unset, direct references to node_to_cpumask_map don't
work:

    arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':
quoted
quoted
arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared (first use in this
function)
     1022 |        node_to_cpumask_map[node]);
	 |        ^~~~~~~~~~~~~~~~~~~

Use cpumask_of_node() here instead.

Isn't it the same as 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210816041032.2839343-1-mpe@ellerman.id.au/ ?

Christophe
quoted hunk
Fixes: bd1dd4c5f528 ("powerpc/pseries: Prevent free CPU ids being reused on another node")
Reported-by: kernel test robot <redacted>
Signed-off-by: Nathan Lynch <redacted>
---
  arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 1ef40ef699a6..d646c22e94ab 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -1021,7 +1021,7 @@ static int __init pseries_cpu_hotplug_init(void)
  			/* Record ids of CPU added at boot time */
  			cpumask_or(node_recorded_ids_map[node],
  				   node_recorded_ids_map[node],
-				   node_to_cpumask_map[node]);
+				   cpumask_of_node(node));
  		}
  
  		of_reconfig_notifier_register(&pseries_smp_nb);

Re: [PATCH] powerpc/pseries/cpuhp: fix non-NUMA build

From: Nathan Lynch <hidden>
Date: 2021-08-16 15:26:30

Christophe Leroy [off-list ref] writes:
Le 16/08/2021 à 17:17, Nathan Lynch a écrit :
quoted
With CONFIG_NUMA unset, direct references to node_to_cpumask_map don't
work:

    arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':
quoted
quoted
arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared (first use in this
function)
     1022 |        node_to_cpumask_map[node]);
	 |        ^~~~~~~~~~~~~~~~~~~

Use cpumask_of_node() here instead.

Isn't it the same as 
https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210816041032.2839343-1-mpe@ellerman.id.au/ ?
Yes, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help