Skip to contentSkip to conversation

powerpc/powernv: Allow smt-enabled=off on Power9

PATCH New Michael Ellerman 1 participant 1 message Jan 10, 2019 PowerPC

lore
Share & tools
lore

Michael Ellerman

author reviewer
#0 lore raw

PATCH 1/1 powerpc/powernv: Allow smt-enabled=off on Power9

In commit d70a54e2d085 ("powerpc/powernv: Ignore smt-enabled on Power8 and later") we disabled smt-enabled=off on Power8 and later CPUs because the subcore logic required all CPUs to be booted.

However Power9 doesn't support subcore, so we can support smt-enabled=off on Power9. Fix the code to do that.

Fixes c3ab300ea555 ("powerpc: Add POWER9 cputable entry")
---
 arch/powerpc/platforms/powernv/smp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/powerpc/platforms/powernv/smp.c +5 -5
index 0d354e19ef92..3ab5755eb09f 100644
@@ -254,12 +254,12 @@ static void pnv_smp_cpu_kill_self(void)
 static int pnv_cpu_bootable(unsigned int nr)
 {
 	/*
-	 * Starting with POWER8, the subcore logic relies on all threads of a
-	 * core being booted so that they can participate in split mode
-	 * switches. So on those machines we ignore the smt_enabled_at_boot
-	 * setting (smt-enabled on the kernel command line).
+	 * On POWER8 the subcore logic relies on all threads of a core being
+	 * booted so that they can participate in split mode switches. So on
+	 * those machines we ignore the smt_enabled_at_boot setting (smt-enabled
+	 * on the kernel command line).
 	 */
-	if (cpu_has_feature(CPU_FTR_ARCH_207S))
+	if (cpu_has_feature(CPU_FTR_ARCH_207S) && !cpu_has_feature(CPU_FTR_ARCH_300))
 		return 1;
 
 	return smp_generic_cpu_bootable(nr);
Signature · 1 line
2.20.1