From patchwork Tue Dec 17 18:33:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suzuki K Poulose X-Patchwork-Id: 181904 Delivered-To: patch@linaro.org Received: by 2002:ac9:44c4:0:0:0:0:0 with SMTP id t4csp6069212och; Tue, 17 Dec 2019 10:34:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxXZHFhkw1Bk1Iv56jwu9zKeoR5vaU2WJXErigwd7CEO8sdipzUkofpK5qoFkmgJsoErhqh X-Received: by 2002:a05:6830:9:: with SMTP id c9mr39824934otp.94.1576607681055; Tue, 17 Dec 2019 10:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576607681; cv=none; d=google.com; s=arc-20160816; b=za8tHBysQnPogwtd1yd24/FfW1lObKLZqsXpmQ39xhP5sag9JigJWB7DQUYnTsWQ8D lPDJYXGNSybzZ+Pu6Ff83dF6clAYarZDCDvs0Hl+S40IDBl1buYXwq/irAi1tzJTPxoT sRWvUOcZb4y4QAuVYdJxdtU/1frN81LyaWawlxOpfGiOcVDvbCiXUEEdi8lOQalKNpHH US/fFYAbgRF/fIBHnstwStDf6XBpeYZUz43Nwsz13qRgBIf20Jbx2eRHSV4vl9QfufrX oevJKub/3Ctzz8MZKrMlWEqasi8xM2ErVpGrLxID3c9p8hvsxB/by9GwuInxkrimUYKQ LQvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=IjcXQ0qPSFYMMoa7H49yoChHa5oMGkcbvXxPo8MW2GU=; b=XvH3BcQbmsQakNJArm1zv8hUiRQYvCoq+5IV0X0LV/KcUshNv+B1a7tiaEuHr5AKZt R0+mKbEnoaJEY61RTZcB+8cEKMnVAgv/vlaAqXWeP75PokdwMGWcUCFuTqGzvZQtJiao s/slS30RzTkjZoORJ6kKm5c0zvio3j9kiXGBR/kKDImGrSyTc3ZmXBAMsxK4BJ1HXNtm +mlUW06W3OSvOmWhe0RJyD3v5mpmO8Y2FGEDERqIAbND/v8os6IZAS8TJ9N6w1AfGl1c TdwCs0N4F9WG8s9mEVIsiGgIOavq1wV68kvGG7WeNzmRQfkVGhqbMKiZ8DPgTL0ndn/O adAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9si13890337otb.49.2019.12.17.10.34.40; Tue, 17 Dec 2019 10:34:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728229AbfLQSeX (ORCPT + 27 others); Tue, 17 Dec 2019 13:34:23 -0500 Received: from foss.arm.com ([217.140.110.172]:44780 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728006AbfLQSeW (ORCPT ); Tue, 17 Dec 2019 13:34:22 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 81C7331B; Tue, 17 Dec 2019 10:34:21 -0800 (PST) Received: from ewhatever.cambridge.arm.com (ewhatever.cambridge.arm.com [10.1.197.1]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 321A53F67D; Tue, 17 Dec 2019 10:34:20 -0800 (PST) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, will@kernel.org, maz@kernel.org, mark.rutland@arm.com, dave.martin@arm.com, catalin.marinas@arm.com, ard.biesheuvel@linaro.org, christoffer.dall@arm.com, Suzuki K Poulose Subject: [PATCH v2 3/7] arm64: cpufeature: Fix the type of no FP/SIMD capability Date: Tue, 17 Dec 2019 18:33:58 +0000 Message-Id: <20191217183402.2259904-4-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191217183402.2259904-1-suzuki.poulose@arm.com> References: <20191217183402.2259904-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The NO_FPSIMD capability is defined with scope SYSTEM, which implies that the "absence" of FP/SIMD on at least one CPU is detected only after all the SMP CPUs are brought up. However, we use the status of this capability for every context switch. So, let us change the scope to LOCAL_CPU to allow the detection of this capability as and when the first CPU without FP is brought up. Also, the current type allows hotplugged CPU to be brought up without FP/SIMD when all the current CPUs have FP/SIMD and we have the userspace up. Fix both of these issues by changing the capability to BOOT_RESTRICTED_LOCAL_CPU_FEATURE. Fixes: 82e0191a1aa11abf ("arm64: Support systems without FP/ASIMD") Cc: Will Deacon Cc: Mark Rutland Cc: Catalin Marinas Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.23.0 diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index d25ad65bfac2..2fc9f18e2d2d 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1369,7 +1369,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = { { /* FP/SIMD is not implemented */ .capability = ARM64_HAS_NO_FPSIMD, - .type = ARM64_CPUCAP_SYSTEM_FEATURE, + .type = ARM64_CPUCAP_BOOT_RESTRICTED_CPU_LOCAL_FEATURE, .min_field_value = 0, .matches = has_no_fpsimd, },