From patchwork Thu Oct 10 17:15:15 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: 175791 Delivered-To: patch@linaro.org Received: by 2002:ac9:3c86:0:0:0:0:0 with SMTP id w6csp2583122ocf; Thu, 10 Oct 2019 10:15:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwR6EPqdoysXNxbgPQLOS0NXdqhehloMmXlDJ4KUmQpogEq/MHLCmpbbsSH9mAYDKzFAX6Y X-Received: by 2002:aa7:cd06:: with SMTP id b6mr9557970edw.58.1570727737502; Thu, 10 Oct 2019 10:15:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570727737; cv=none; d=google.com; s=arc-20160816; b=ZSzNZMRJZG7AiuIiYb+QaWfjHsyacqa/ItdFgrDOUi1pRhvjkdo4vTsephLyoLhxdk KfDTF8+diUYVXuUd4oDviiXux9zNH6g20mQz9h0o2W6b8a4fSyNwr6u66Nv58HNNM/Bg KunCkOh6I8ve2RPsxj6pMvJxPnJqZmlC2QwIEUWh8QAXLsQ9diqq3pPHgr9nH5r2Xgs3 vtZpVvjskVH7l+yW2XicS/O0wmivzRY9ef8KedH63JBtK4U5kMBmA7fx0ZiiS8ZQVMUN JG/JKyiPlWd3LD0/YjUCkXoyK6tQjZfKM3Ajl7DHsbuSzLIFnxSC1S50MNwT1IOjji5Q exgQ== 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=NzoLXkuBE3uZwfTyn3bN45NmrGp2sJl+WrfGjTbOjfA=; b=A19e2jvsaisXEBC+jDZtiAxbSZc2HUNc8vl5A4YwJJ3IMxMCg/qKpmdj94B5jhO6tK Ui2Xkf17evBMpHMGHY6aDoSq9zVD/vLBq+XRbW8YsD4dIkEQx7BHz2/mWQKjOl7kFVX8 X5VChNzxYf40rpijYJjTnHyoDfrjBZMb4tjvpE967w3mK4/xoObTmibLXGgH8xFP5o9S nZNbgTML1+sbiZ0KpjmJsRNpgphheyH0v8ukTO4NG8Mos/W5xzLs4esL2P9K2xBBeODv Nd8WM33RWGVkVl4e8E7obJY7tDwKNi/KHvxclqmGqJeZ0j6RT0k8StIHBAzU85NuKU/R y7Zw== 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 l20si3417247ejb.111.2019.10.10.10.15.37; Thu, 10 Oct 2019 10:15:37 -0700 (PDT) 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 S1726799AbfJJRPg (ORCPT + 21 others); Thu, 10 Oct 2019 13:15:36 -0400 Received: from foss.arm.com ([217.140.110.172]:36346 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbfJJRPf (ORCPT ); Thu, 10 Oct 2019 13:15:35 -0400 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 76E4C1000; Thu, 10 Oct 2019 10:15:35 -0700 (PDT) Received: from dawn-kernel.cambridge.arm.com (unknown [10.1.197.116]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 74C4B3F71A; Thu, 10 Oct 2019 10:15:34 -0700 (PDT) From: Suzuki K Poulose To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, will@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, dave.martin@arm.com, Suzuki K Poulose Subject: [PATCH 1/3] arm64: cpufeature: Fix the type of no FP/SIMD capability Date: Thu, 10 Oct 2019 18:15:15 +0100 Message-Id: <20191010171517.28782-2-suzuki.poulose@arm.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191010171517.28782-1-suzuki.poulose@arm.com> References: <20191010171517.28782-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 scop 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.21.0 diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 9323bcc40a58..0f9eace6c64b 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1361,7 +1361,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, },