Message ID | 20240213-arm64-fp-init-vec-cr-v1-2-7e7c2d584f26@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-63812-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:bc8a:b0:106:860b:bbdd with SMTP id dn10csp624625dyb; Tue, 13 Feb 2024 07:47:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWaZVGWJpfDcu6PX3s3NEyeU1wU2VSxWyXfvhPdsMrCF+CnBXudSCIo4F1B7ebuC7zyWIFFPZ+ec2+cTudPfic+T0jQqA== X-Google-Smtp-Source: AGHT+IHndsNK/eRF6HkDGg4UOdpJzqDEUVtN4es4tHXwDk7xuKVch5fve4lrbpbExndoFMuE6+xy X-Received: by 2002:a17:906:4688:b0:a3d:2146:5703 with SMTP id a8-20020a170906468800b00a3d21465703mr499557ejr.6.1707839224350; Tue, 13 Feb 2024 07:47:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707839224; cv=pass; d=google.com; s=arc-20160816; b=TXGCDbMO+xTO0NFHW2Yp+3dC/Mte2u3suEvzeD9pX/WaTGWWMIaPBGgFTDKbHrxx3p 27WrNSOH+rjj1HruryhljeSVAL/mPHQOmFOSwryKKXrGGnJ2/ehpCc1PtJTunsm3h7Pr bK1yH2AvAlGEUiDVtzsCphQKiymJbj/yXWFMgzNNRyfzL0mo/tEPniHCykic8M6E41c0 Bg0glF44exfp3dx1q2cA6OCX41F7IzEKa2DVJmdm9LSY23k13i006rRzdbofrc8/h8l6 on2Ug/yv0D19+QMoZT4QaABmooUmmVlGqPQR7j9fGin3sD6l6dZFfjkVV3rzRCC/Vp6x K8pA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=ffCN8yCnDUSbozFthrfvqJHMyKLtgP5xk6pxVi86YcY=; fh=oquJAeWXUG8WhDPcjGiKZ7u3gBcNg+XFEO5wLDnlI4g=; b=02+EzqjHQHA+Qw+oRIq5ceLybuKPm2aPvpgz2/pup4jtMuUcD5royqaIOKZENzCeem VOcb2qFYTIE+xqQ3JIiijaGGjW1ynzOZwpqhNnzC6Sn1wgWrOgD2mIWkibxDEJwZjcVj afPOf+6oGa9zMtdg3qXeNo7Tu/BsnCVxQQ96GY7PSYFwHiGuxiRS0IneHjIuKlaQVMxw cYZUXYi4xUYYbh8st7H3Z6ffhw45Ij0Zfdoy0r5KiFtPhPbqiDPLkFw4eSd7L8RHKFFY /SrUpnYr8UVNJHe3CNATWGnGX4LjCa4ihNCKtois61dVcRVoa99lG6+hhnwdAOq9tv2g ZeYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z0CcMPpP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63812-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63812-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCXbHFtTRMChOnc/kejgVYvx4dJKoCt88uwmLu+tN3aBq249yqEgMX3dT5Wgf92wcUsgg/ukJ1FFvoc6PgvodVvS98mG1Q== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id y15-20020a17090629cf00b00a3d003fd328si778758eje.938.2024.02.13.07.47.04 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 07:47:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63812-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z0CcMPpP; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63812-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63812-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9AC2F1F272BB for <ouuuleilei@gmail.com>; Tue, 13 Feb 2024 15:36:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 421A25F577; Tue, 13 Feb 2024 15:35:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z0CcMPpP" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFE565F467 for <linux-kernel@vger.kernel.org>; Tue, 13 Feb 2024 15:35:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707838554; cv=none; b=frRvFGJb7JATspCK7S3z2J/WgleJ8wHnK4K4FVabqTIxR/jKCjYr9wXEIW7V3dVySdLUTgIsu3bldf7lMZXIhGdy8Mep2OBT+D2df9cROjxaubJOgTLwNwdGG2ZZHu5EPdBFVef7bZ7xUF6nG+QiRqHtR0Mwbd6Rq+EnMdgFhtk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707838554; c=relaxed/simple; bh=3QP5xdQgCtutqWVSSb21JK6+dtuADu8WvFbwQO2EMwE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CqI61iJgjkcmn9DjAqkGcLhSDk9OPBeZHy5nZgXtufVPoMP7EW9TS26K/EuCE/lqPNLnFOVYSzVThX9AyX6bYXzoRPmr5HJoKqPadjPhiLBgn1s47kdFezXoiz9nLlMsYq3dj3LCC4IRyzhdS7ccXuLTpzqlNc2sQQyFTMj5T7k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z0CcMPpP; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C3C0C433F1; Tue, 13 Feb 2024 15:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707838554; bh=3QP5xdQgCtutqWVSSb21JK6+dtuADu8WvFbwQO2EMwE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Z0CcMPpPKSEqSEkrJ8GWhfqOB59+LE1ZCYDCIWlQUQxGvnHCc5UcuvW7hTvKzjEct VVzNQLvxGHww6+0O28Vk2HqP7LwI8R4iEkLpIOJMm/yhR5IthxW5z8DUGPMUVBzB/S ngXi/4fauKql39WahyPOmof613fXlhQ0Vz0KPKa3tgD4ySdLvBinkNQqbzlB2UYQqB BSuzgpuO6zhhfWmNUyNIAlJ6WiY/gBK44cFnBmKsHsArls4n+GeFanY0QnH9BLIQEQ ZIFOjlouV0DmK1Pd6T4XyzfVRQdtykc1GjSXvelON6WCVhaym3binh+CYHKuEXVeJl Kd/5CjcsEwvRQ== From: Mark Brown <broonie@kernel.org> Date: Tue, 13 Feb 2024 15:32:46 +0000 Subject: [PATCH 2/2] arm64/sme: Ensure that all fields in SMCR_EL1 are set to known values Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240213-arm64-fp-init-vec-cr-v1-2-7e7c2d584f26@kernel.org> References: <20240213-arm64-fp-init-vec-cr-v1-0-7e7c2d584f26@kernel.org> In-Reply-To: <20240213-arm64-fp-init-vec-cr-v1-0-7e7c2d584f26@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: Dave Martin <Dave.Martin@arm.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mark Brown <broonie@kernel.org> X-Mailer: b4 0.13-dev-a684c X-Developer-Signature: v=1; a=openpgp-sha256; l=981; i=broonie@kernel.org; h=from:subject:message-id; bh=3QP5xdQgCtutqWVSSb21JK6+dtuADu8WvFbwQO2EMwE=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBly4xUA3rs0ghZm22tJlDf7DiTmlghGGgzwk5+CB7+ o8iscR+JATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZcuMVAAKCRAk1otyXVSH0A3DB/ 4nCFlJDvs+F0CTlMKwubqM8n+bW2BzQNqbAeq+wTMLRi7W6b6FyPofh0STmmfdePtpS4d1Y4jR16Ce 21nbI1rJfcnJhj0i4VofrhgfcYjvkEVXRJc6GTDWMOgpZj1pOno/HCUbKHZz+icpqMXuqlMRTQu+lg zM+sA2yJpndyJRBtrXYShEiYLdo+tS4Xo+yQgGdXBuf/dN+cUTYRNAHwQxEsK/BHPb9A5UlcF3ApCR XK6RyI+8Z4gRKs0dggA8u6rSIdt4fQjzG+qh0xkn1b7uwrkTP2uJgG0RnZRgehnrNx0gzdlTZVrQeh 8WLSDDH8meCJ2fQkPPMkavpklqjWbA X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790799222157779456 X-GMAIL-MSGID: 1790799222157779456 |
Series |
arm64/fp: Initialise all bits in vector control registers to known values
|
|
Commit Message
Mark Brown
Feb. 13, 2024, 3:32 p.m. UTC
At present nothing in our CPU initialisation code ever sets unknown fields
in SMCR_EL1 to known values, all updates to SMCR_EL1 are read/modify/write
sequences. All the unknown fields are RES0, explicitly initialise them as
such to avoid future surprises.
Signed-off-by: Mark Brown <broonie@kernel.org>
---
arch/arm64/kernel/fpsimd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index cc3c9ad877a8..f96907b813fa 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -1247,6 +1247,9 @@ void cpu_enable_sme(const struct arm64_cpu_capabilities *__always_unused p) write_sysreg(read_sysreg(CPACR_EL1) | CPACR_EL1_SMEN_EL1EN, CPACR_EL1); isb(); + /* Ensure all bits in SMCR are set to known values */ + write_sysreg_s(0, SYS_SMCR_EL1); + /* Allow EL0 to access TPIDR2 */ write_sysreg(read_sysreg(SCTLR_EL1) | SCTLR_ELx_ENTP2, SCTLR_EL1); isb();