aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
authorGravatar Michael Ellerman <mpe@ellerman.id.au> 2023-08-14 21:46:03 +1000
committerGravatar Michael Ellerman <mpe@ellerman.id.au> 2023-08-14 21:46:03 +1000
commit15f63e306d96b702ce3e0d335e9ddf55972da32c (patch)
tree86bf3f16f1aac13f911c2736b996efc772ef274b /arch/powerpc/kernel/smp.c
parentpowerpc/kexec: fix minor typo (diff)
parentpowerpc/pseries: Honour current SMT state when DLPAR onlining CPUs (diff)
downloadlinux-15f63e306d96b702ce3e0d335e9ddf55972da32c.tar.gz
linux-15f63e306d96b702ce3e0d335e9ddf55972da32c.tar.bz2
linux-15f63e306d96b702ce3e0d335e9ddf55972da32c.zip
Merge branch 'topic/cpu-smt' into next
Merge SMT changes we are sharing with the tip tree.
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r--arch/powerpc/kernel/smp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 8cb6d1c90266..5826f5108a12 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -1088,7 +1088,7 @@ static int __init init_big_cores(void)
void __init smp_prepare_cpus(unsigned int max_cpus)
{
- unsigned int cpu;
+ unsigned int cpu, num_threads;
DBG("smp_prepare_cpus\n");
@@ -1155,6 +1155,12 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
if (smp_ops && smp_ops->probe)
smp_ops->probe();
+
+ // Initalise the generic SMT topology support
+ num_threads = 1;
+ if (smt_enabled_at_boot)
+ num_threads = smt_enabled_at_boot;
+ cpu_smt_set_num_threads(num_threads, threads_per_core);
}
void smp_prepare_boot_cpu(void)