summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2023-07-05 16:51:43 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2023-08-02 22:49:46 +1000
commitd1099e2276df1d8dd4037552c2f34eb4c4df4a75 (patch)
tree10e415a99813b3eb3504a9afcb99a8aa3c489fd8 /arch/powerpc/platforms/pseries
parent73c58e7e14126466701705820c4eb47daddc357d (diff)
powerpc/pseries: Honour current SMT state when DLPAR onlining CPUs
Integrate with the generic SMT support, so that when a CPU is DLPAR onlined it is brought up with the correct SMT mode. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230705145143.40545-11-ldufour@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries')
-rw-r--r--arch/powerpc/platforms/pseries/hotplug-cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c
index 61fb7cb00880..e62835a12d73 100644
--- a/arch/powerpc/platforms/pseries/hotplug-cpu.c
+++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c
@@ -398,6 +398,14 @@ static int dlpar_online_cpu(struct device_node *dn)
for_each_present_cpu(cpu) {
if (get_hard_smp_processor_id(cpu) != thread)
continue;
+
+ if (!topology_is_primary_thread(cpu)) {
+ if (cpu_smt_control != CPU_SMT_ENABLED)
+ break;
+ if (!topology_smt_thread_allowed(cpu))
+ break;
+ }
+
cpu_maps_update_done();
find_and_update_cpu_nid(cpu);
rc = device_online(get_cpu_device(cpu));