From patchwork Thu Jan 10 11:53:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 1022855 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43b4Fg1dpNz9sMQ for ; Thu, 10 Jan 2019 22:55:51 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 43b4Ff59DkzDqf9 for ; Thu, 10 Jan 2019 22:55:50 +1100 (AEDT) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (bilbo.ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 43b4CH2WfJzDqdR for ; Thu, 10 Jan 2019 22:53:47 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au Received: by ozlabs.org (Postfix) id 43b4CG35v9z9sLt; Thu, 10 Jan 2019 22:53:46 +1100 (AEDT) Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1034) id 43b4CG27XXz9sMQ; Thu, 10 Jan 2019 22:53:46 +1100 (AEDT) From: Michael Ellerman To: linuxppc-dev@ozlabs.org Subject: [PATCH] powerpc/powernv: Allow smt-enabled=off on Power9 Date: Thu, 10 Jan 2019 22:53:35 +1100 Message-Id: <20190110115335.29463-1-mpe@ellerman.id.au> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mikey@neuling.org, paulus@samba.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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") Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/powernv/smp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/platforms/powernv/smp.c b/arch/powerpc/platforms/powernv/smp.c index 0d354e19ef92..3ab5755eb09f 100644 --- a/arch/powerpc/platforms/powernv/smp.c +++ b/arch/powerpc/platforms/powernv/smp.c @@ -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);