Message ID | 20240213-arm64-sme-resume-v3-2-17e05e493471@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BE181C48260 for <linux-arm-kernel@archiver.kernel.org>; Tue, 13 Feb 2024 23:07:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+8KHkP5x06JyzZFHv5My6X0UKNIWDuLu/AX9Ls/mT9o=; b=VaXFaL8MPyznmj J/e7Qkev2fS9scbVxTOVGlfF08fwg00oqYk77dq2CUcRVIansXmKV9mAPFIOvsR3stLneBD0Jj7WM MX+cYWZ+J3t6Hz6p+3EeXT/+cocClVsTmYgDoRm0lJAYYn+lXnuEQ7hAh+xW9V7mm1cx7IGz+rBPQ Ko/jlml3azD8sQNVoPgciX0dn2D/oIB9aA1gchRATU8au41woRQWb2sgbZmsaPuoQVb61qHhZs1dw uph8A77q2uqaokDWr4HhV7EcpwgLEcHaYVHbgno99ZdvrgqsDKmIRo2ugJ4hIqjU6DO3g4CBMGWrT m3aQG5O7VSwg434XycvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ra1s0-0000000BBM6-3Sh4; Tue, 13 Feb 2024 23:07:20 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ra1ry-0000000BBLP-3Tj1 for linux-arm-kernel@lists.infradead.org; Tue, 13 Feb 2024 23:07:20 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id EDE9461750; Tue, 13 Feb 2024 23:07:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 61A2EC43399; Tue, 13 Feb 2024 23:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707865637; bh=EAbTSMPbYo7NkFe23hvp0C1Clui1JNxdOmENIj9lOq4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=hAJ8LHaghvkkxiqweYcM+tjPbcoozyj5+8nI1gtLU/uVOCVrHD7A9LBc0o/34npev SK1vQzANlK3ndNgpc/RLlEWZi8l46QgqfgZAATTea1mP2gJWG7LpxoM9M/AQX/bZdh KU/1RK7GCoTOG17RZJl40JGHJO5ReH1kycxLs5ax9hg/0utXfaaJVgfLGDeu4/JX9K VsKAt4OVe3KZpNIG88AnBijgOFUlG0qECnDyIFqig/6TWlYOaQn2kOwM99tqWnQhic w7xb1AG+v4dSLu/NxhQMaqLNVVI1fDRdZrpcIbNVanXzZcSHdhHjbRSCVN92jJw5sX k4P3ED7ZIg1zA== From: Mark Brown <broonie@kernel.org> Date: Tue, 13 Feb 2024 23:06:33 +0000 Subject: [PATCH v3 2/2] arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend MIME-Version: 1.0 Message-Id: <20240213-arm64-sme-resume-v3-2-17e05e493471@kernel.org> References: <20240213-arm64-sme-resume-v3-0-17e05e493471@kernel.org> In-Reply-To: <20240213-arm64-sme-resume-v3-0-17e05e493471@kernel.org> To: Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org> Cc: Dave Martin <Dave.Martin@arm.com>, Jackson Cooper-Driver <Jackson.Cooper-Driver@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=986; i=broonie@kernel.org; h=from:subject:message-id; bh=EAbTSMPbYo7NkFe23hvp0C1Clui1JNxdOmENIj9lOq4=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBly/Yf2kx5jbZv4Nhm4KK9MO6SBlZ5G5dJiR7zhNs8 y2ljCYqJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZcv2HwAKCRAk1otyXVSH0OLCB/ wIv2Gm5BjBWurapN1ify5+sQprymBHlpMubMEOS4g3KPoR522jMOGZh3OxMw/l0X3TiSza46yYr7Cr OH5chMq2fJnNrbOsO/jsBLE2wiHdLCdI8AYmlBmKRVJijQU486QLCnKVckNHph9svDlQIx8GPzCp3N JeR3Q+L2salvs5LqJO2jnCsrC9iVQqPaU4nozI4eWcSvRkHWf+51QK7Viy8blrlXZP4irrh3XobJRI o9uwhnXaNwGPnd0V31PDawbO190djWiylohffo0Xba5PSGDus/4gvqmE+1OizjoTi1P7NN3GZoDZqa fVhSQTM57RcDXbF8TuKZo+6p03+e26 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240213_150718_949371_E0C920FB X-CRM114-Status: UNSURE ( 9.08 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
arm64/sme: Fix handling of traps on resume
|
expand
|
diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c index 8d2a5824d5d3..7a7c056f0647 100644 --- a/arch/arm64/kernel/fpsimd.c +++ b/arch/arm64/kernel/fpsimd.c @@ -1320,6 +1320,8 @@ void sme_suspend_exit(void) if (system_supports_fa64()) smcr |= SMCR_ELx_FA64; + if (system_supports_sme2()) + smcr |= SMCR_ELx_EZT0; write_sysreg_s(smcr, SYS_SMCR_EL1); write_sysreg_s(0, SYS_SMPRI_EL1);
The fields in SMCR_EL1 reset to an architecturally UNKNOWN value. Since we do not otherwise manage the traps configured in this register at runtime we need to reconfigure them after a suspend in case nothing else was kind enough to preserve them for us. Do so for SMCR_EL1.EZT0. Fixes: d4913eee152d (arm64/sme: Add basic enumeration for SME2) Reported-by: Jackson Cooper-Driver <Jackson.Cooper-Driver@arm.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- arch/arm64/kernel/fpsimd.c | 2 ++ 1 file changed, 2 insertions(+)