Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp685959ybv; Thu, 13 Feb 2020 07:45:32 -0800 (PST) X-Google-Smtp-Source: APXvYqxTN2uZpbiQeqb8U5C0JiOYbbwjwuRxn7oxiJUSJpw9+h1KCEVxJeeUEbvX+rVGdSRfycq+ X-Received: by 2002:a05:6808:a83:: with SMTP id q3mr3485798oij.0.1581608732380; Thu, 13 Feb 2020 07:45:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581608732; cv=none; d=google.com; s=arc-20160816; b=LVPTtdnZZMd5FJgwpGcDGzdAQ9h/rR/q6gLtZD4K4aUncWLGg3SCLMj7DaI+GLxw4M MMT33906cgqNLnqYnNKQ+OcyVq0DHyH2BEGxOI6NSptllDOgsnzL9JP0fyN3QTDcOuZB KHhpDSGr2TKITfGyhnY42jt4K+Wwa4Vn6YvMng/P6WriEzYp4IpVuOpeO/Y7rpMKxOwS MLFSBmWGk5E/oEaFEG9ws5cBiacngtAe0i6L1hUyByFPTil1pVqdFo0bR8tQfg1n4QrQ 350gqemyNDiSmt+gUO50JkZ0TRavvZkjFglLdMcaaFKm2QAVJ7Ms0zfbOsAh92O+FPFe U32w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LcXtdlqOB4aBoJ5mtPbGK7w8OlHd/cIB4hwsSPLkr/A=; b=gEbNXHVUpTF2pUV1yagIDHepjwpavQ+3LJiWaAOjSJ21KQaDebk2k6il0IGqbk3y+b CEkmFZqEW8680dhcect5blnCYowXNvZzgr8LNcW/p2gOXSvzTSvMILF+rRTZSs4/gJ0E KLC/YkW5y2JMwUIMeug0/5pcNeEf/xvNx4oHSwmQIrxcddz9nPZeG4bhLRqAU1eUWRHa 0mkulpMnPGSsJ3aOx2ZdQ77f2RnKKqtc8/r8HPWIZLQp7oeoAQUMjPbaRXQ3w5eCXjNp SKoOfcSWK2gZHa2mNFH8Hlrjw9Gw6rqY2mBo4jbIPOX22fotqfFeQXUccaOehxGKUCc3 Lvdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=qJyxAa0O; 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 j13si1208858otq.146.2020.02.13.07.45.20; Thu, 13 Feb 2020 07:45:32 -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; dkim=pass header.i=@kernel.org header.s=default header.b=qJyxAa0O; 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 S1729893AbgBMPpO (ORCPT + 99 others); Thu, 13 Feb 2020 10:45:14 -0500 Received: from mail.kernel.org ([198.145.29.99]:51148 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729430AbgBMP1d (ORCPT ); Thu, 13 Feb 2020 10:27:33 -0500 Received: from localhost (unknown [104.132.1.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 75133206DB; Thu, 13 Feb 2020 15:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607652; bh=dFdzzarvAnU4bC10RLMRXRLW9GdfSigpZSNr4TdWn1Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qJyxAa0OjY2vK8+Gr8WpRfKsLAbFD9TLRQN/R1Sam5zk24ZV7S2rdIoCaeYtK0G+N 8k9t0xERikiIk0WwqwVgtXS9ygVmyIflb8tS7Uyopbronfi17mEFbBQvNCjF4S3MBd hs4SqKj7p4qElTppwXYAjt6Jt4mXbEgsaL5jmnvs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Will Deacon , Mark Rutland , Ard Biesheuvel , Catalin Marinas , Suzuki K Poulose Subject: [PATCH 5.4 65/96] arm64: cpufeature: Fix the type of no FP/SIMD capability Date: Thu, 13 Feb 2020 07:21:12 -0800 Message-Id: <20200213151904.029786736@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151839.156309910@linuxfoundation.org> References: <20200213151839.156309910@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suzuki K Poulose commit 449443c03d8cfdacf7313e17779a2594ebf87e6d upstream. 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: Ard Biesheuvel Reviewed-by: Catalin Marinas Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1367,7 +1367,7 @@ static const struct arm64_cpu_capabiliti { /* 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, },