Skip to content

Commit

Permalink
arm64/sme: Restore SMCR_EL1.EZT0 on exit from suspend
Browse files Browse the repository at this point in the history
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: d4913ee ("arm64/sme: Add basic enumeration for SME2")
Reported-by: Jackson Cooper-Driver <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
broonie authored and willdeacon committed Feb 20, 2024
1 parent 9533864 commit d7b77a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm64/kernel/fpsimd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d7b77a0

Please sign in to comment.