Skip to content

Commit

Permalink
powerpc/pseries: Fix build error when NUMA=n
Browse files Browse the repository at this point in the history
As reported by lkp, if NUMA=n we see a build error:

   arch/powerpc/platforms/pseries/hotplug-cpu.c: In function 'pseries_cpu_hotplug_init':
   arch/powerpc/platforms/pseries/hotplug-cpu.c:1022:8: error: 'node_to_cpumask_map' undeclared
    1022 |        node_to_cpumask_map[node]);

Use cpumask_of_node() which has an empty stub for NUMA=n, and when
NUMA=y does a lookup from node_to_cpumask_map[].

Fixes: bd1dd4c ("powerpc/pseries: Prevent free CPU ids being reused on another node")
Reported-by: kernel test robot <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
mpe committed Aug 16, 2021
1 parent 0355785 commit 8b893ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/platforms/pseries/hotplug-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8b893ef

Please sign in to comment.