Message ID | 20240203-arm64-sme-resume-v2-2-a1fbaddc4425@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 BCDDCC4828F for <linux-arm-kernel@archiver.kernel.org>; Sat, 3 Feb 2024 13:01:44 +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=jnTp6KMu3DGpjf mHfxeNCZ1Jzm93pgxlgPe6GA2dxhuqWJq7bA59ICKgA54EFRLqDXO1FADXFJS7ku7E8+8KVSW12Q+ o4saXBaW8M094le9nDNkmBLojtdiJ6ijwcEyzd6V+I984YLUegOq0D+lloBWwVQkUXDhqi8ZUDRIX G3qKPwkowkN8eYQDwXfFYsJEtK7psW0bCSgXHacAb0OwyuFCGuIuT6YGiuNH8jRHNeNtjt50qSd/z 2DWC6eAtCdqs+5ZGFLqX4eIsND5B9YZ4moznzkM8wc5UEYGmGdJRKzVKvq4zZXdlrk5kPNu+gyDrZ QY17mO9o0hDoq5Z+EIVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWFeK-0000000GTLY-0C3E; Sat, 03 Feb 2024 13:01:36 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rWFeD-0000000GTHG-1xBb for linux-arm-kernel@lists.infradead.org; Sat, 03 Feb 2024 13:01:31 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C8E7C60BB7; Sat, 3 Feb 2024 13:01:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39AFCC433C7; Sat, 3 Feb 2024 13:01:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706965288; bh=EAbTSMPbYo7NkFe23hvp0C1Clui1JNxdOmENIj9lOq4=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=uZgat+VUsmUDt+Vq9NXQ25ez0yXRmsrdTc785RA0TkxNDWysZzktZrhq+DvZBQehS 07g9F6qjE9YwLzI3x9kyMI/K+qN22xn05WvQ30rztoXp6xCUGc4yoKJMB5VNreR3f3 jntral71coziR4sPoD0J7Z1M+BaWDcm9r22tGVv/e3XJ4U6bvM71YSJeTlf0Ifkp5d 2CzSOWNtFC+hoEZ/M1z33nLa3Vetjy56LWqGyiQAJmxE09RLyGiPOabhPzpIktTTpm 96udRKseP9jOyeood8fNEVx5FnPpvWD5G1zTuC2Onx+4nPceecdNwHIIFat/TcoJ0L 7NrZhNO/gkMfQ== From: Mark Brown <broonie@kernel.org> Date: Sat, 03 Feb 2024 13:00:41 +0000 Subject: [PATCH v2 2/2] arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend MIME-Version: 1.0 Message-Id: <20240203-arm64-sme-resume-v2-2-a1fbaddc4425@kernel.org> References: <20240203-arm64-sme-resume-v2-0-a1fbaddc4425@kernel.org> In-Reply-To: <20240203-arm64-sme-resume-v2-0-a1fbaddc4425@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/pANAwAKASTWi3JdVIfQAcsmYgBlvjkTOxfeXqJXIwfA+1GogU8KWgiTC8jUf6+WEHcU OzK/j2iJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZb45EwAKCRAk1otyXVSH0BBuB/ 4yB73VEdmQiV/eD2xRwFIagUQD/ROfRHWYDTG+vdDY6evFGYyp+o5jMal0EBnScrQhAtiw5/n0c+0T 98naJhKjgE+s923Ed6S3yhb2n7K5HoYTMx3JQABL+vO+yD1TH+e8R6X6ZOATxZHRG/sC3oe53o6t22 thdMDzT2+2Q51RhxgQ1TYuNp36N9Kw4KPUi1skupgKFdislUvyfxpBF7QQbGyBv+A2bMLvcZLfdiwE X2LNyCYfP0AunHT4tht1Cg7jscj/j0/DHX3VSkAKL07ZCmNVjV4XkAsESTRGkTkFrlcxSos+3bbLWX /npT0r/lQlsn6radcopiLw84Z5Ie5e 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-20240203_050129_619783_BE68ADB4 X-CRM114-Status: UNSURE ( 8.93 ) 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(+)