Commit 3b54c715 authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Michael Ellerman

powerpc/pseries: use slab context cpumask allocation in CPU hotplug init

Slab is up at this point, using the bootmem allocator triggers a
warning. Switch to using the regular cpumask allocator.
Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Tested-by: default avatarSachin Sant <sachinp@linux.vnet.ibm.com>
Reviewed-by: default avatarNathan Lynch <nathanl@linux.ibm.com>
Reviewed-by: default avatarLaurent Dufour <ldufour@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20211105132923.1582514-1-npiggin@gmail.com
parent af47d79b
...@@ -864,12 +864,13 @@ static int __init pseries_cpu_hotplug_init(void) ...@@ -864,12 +864,13 @@ static int __init pseries_cpu_hotplug_init(void)
/* Processors can be added/removed only on LPAR */ /* Processors can be added/removed only on LPAR */
if (firmware_has_feature(FW_FEATURE_LPAR)) { if (firmware_has_feature(FW_FEATURE_LPAR)) {
for_each_node(node) { for_each_node(node) {
alloc_bootmem_cpumask_var(&node_recorded_ids_map[node]); if (!alloc_cpumask_var_node(&node_recorded_ids_map[node],
GFP_KERNEL, node))
return -ENOMEM;
/* Record ids of CPU added at boot time */ /* Record ids of CPU added at boot time */
cpumask_or(node_recorded_ids_map[node], cpumask_copy(node_recorded_ids_map[node],
node_recorded_ids_map[node], cpumask_of_node(node));
cpumask_of_node(node));
} }
of_reconfig_notifier_register(&pseries_smp_nb); of_reconfig_notifier_register(&pseries_smp_nb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment