powerpc/pseries/cpuhp: fix non-NUMA build
PATCH 1/1 powerpc/pseries/cpuhp: fix non-NUMA build
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 2 lines
Quoted 2 lines
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.
--- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/pseries/hotplug-cpu.c +1 -1
@@ -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);
Signature · 1 line
2.31.1
Le 16/08/2021 à 17:17, Nathan Lynch a écrit :
Quoted 10 lines
With
CONFIG_NUMAunset, direct references tonode_to_cpumask_mapdon't work:
arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':Quoted 2 lines
Quoted 2 lines
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/[email protected]/ ?
Christophe
Quoted 22 lines
Fixes bd1dd4c5f528 ("powerpc/pseries: Prevent free CPU ids being reused on another node")Reported-by kernel test robot <[email protected]>Signed-off-by Nathan Lynch <[email protected]>--- arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/powerpc/platforms/pseries/hotplug-cpu.c +1
-1@@ -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);
Quoted 7 lines · Christophe Leroy
Le 16/08/2021 à 17:17, Nathan Lynch a écrit :
Quoted 6 lines
With
CONFIG_NUMAunset, direct references tonode_to_cpumask_mapdon't work:
arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':Quoted 2 lines
Quoted 2 lines
arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared (first use in this function)
Quoted 8 lines
Quoted 4 lines
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/[email protected]/ ?
Yes, thanks.