Commit d7b77a0d authored by Mark Brown's avatar Mark Brown Committed by Will Deacon

arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend

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: d4913eee ("arm64/sme: Add basic enumeration for SME2")
Reported-by: default avatarJackson Cooper-Driver <Jackson.Cooper-Driver@arm.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20240213-arm64-sme-resume-v3-2-17e05e493471@kernel.orgSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 95338648
...@@ -1320,6 +1320,8 @@ void sme_suspend_exit(void) ...@@ -1320,6 +1320,8 @@ void sme_suspend_exit(void)
if (system_supports_fa64()) if (system_supports_fa64())
smcr |= SMCR_ELx_FA64; smcr |= SMCR_ELx_FA64;
if (system_supports_sme2())
smcr |= SMCR_ELx_EZT0;
write_sysreg_s(smcr, SYS_SMCR_EL1); write_sysreg_s(smcr, SYS_SMCR_EL1);
write_sysreg_s(0, SYS_SMPRI_EL1); write_sysreg_s(0, SYS_SMPRI_EL1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment