Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4535095ybl; Mon, 13 Jan 2020 15:39:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxaHe8Ux+l4mUtpc1XoLe9IqwHwDmw8pXs2vFzitIyhho3ZDaC6f/8LCZrtnwCWGtJO3DiZ X-Received: by 2002:aca:af54:: with SMTP id y81mr15004590oie.21.1578958750386; Mon, 13 Jan 2020 15:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578958750; cv=none; d=google.com; s=arc-20160816; b=OuO9lfeuG4vw5QyD5KD2eFf10U9qDkZABuCSSwVJR/SGv3WJ8MQhR0Y8B15uQzZKum KOCwp9YbtkePGO8AZCwK4Ta/oqC3nHWlowz+a37npCSLhrGkKnZizOPDF3WW+RAXsnMP sHMqRnJwGVV8p2LUQqVYmg0CnJu38b8GrKr0scCxvhzvD2bQbVPtRv1QRhxrIp62wFtg wsyNTJBRyTUw2L+qMRW7cBb0jhUdQfz+Q7qIOSqL1W6SesjomoQ91UzhoKMCrEYgjTY+ ffQoP4HiBHW8QNtFS69XiIiUQmefTuS/uWeKXIwUYTsu+KiH9g4OMbx9teQTVUpzopZh 2iQQ== 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=7vLK9Ox5w4Kny3Byl4/cW5KkjQER0MX+J0ecCnoSUdU=; b=neV856ZJIz6J6OiX1cgXAcNGu/9gtVm29Lwk44JZUsmfkpxAgeZ9FyuScwQ7pTlvLw jZe1PTXMj8qcRVZ9fLKLNT2MK8PaxGEe16iVIsxg3crSEkdBpkb1Q9Ic1aQBZM9UspZ6 pupbyCuXuSNFCaXFn09I4edHZRCsH+YXOLYmU42LxtGKgNWA0f4z0q5jRskQhL+ShIo8 uRQcGUoFHiiEgza5/+Vys84F7QsR0M5LPWb/mll5HLAPmjDwBaK/i364HDcnOlQAX6Cp LXpQnDtoi584mAa67CwObDWweC+GsmnBlpdYgS8F6Ax82mil/IJNpQxp8uB11A9/zxgs Ujsg== 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 g2si7096825otn.117.2020.01.13.15.38.58; Mon, 13 Jan 2020 15:39:10 -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 S1729346AbgAMXbU (ORCPT + 99 others); Mon, 13 Jan 2020 18:31:20 -0500 Received: from foss.arm.com ([217.140.110.172]:45672 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727282AbgAMXbU (ORCPT ); Mon, 13 Jan 2020 18:31:20 -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 D3C2011B3; Mon, 13 Jan 2020 15:31:19 -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 BA5383F68E; Mon, 13 Jan 2020 15:31:18 -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, catalin.marinas@arm.com, ard.biesheuvel@linaro.org, mark.rutland@arm.com, Suzuki K Poulose Subject: [PATCH v3 3/7] arm64: cpufeature: Fix the type of no FP/SIMD capability Date: Mon, 13 Jan 2020 23:30:19 +0000 Message-Id: <20200113233023.928028-4-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200113233023.928028-1-suzuki.poulose@arm.com> References: <20200113233023.928028-1-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 1154f2d47b4b..7c373722f692 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1428,7 +1428,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, }, -- 2.24.1