[PATCH] arm64/sme: Fix the ffr variable assignment
Mark Brown
broonie at kernel.org
Thu Jun 2 01:26:31 PDT 2022
On Wed, Jun 01, 2022 at 06:13:46PM +0100, Catalin Marinas wrote:
> This variable is a bool and expected to be set to true if the FFR
> state needs saving/restoring, false otherwise. In __efi_fpsimd_end()
> this variable should be restored to the value of efi_sm_state but this
> is a per-CPU variable, not to be read directly. Make ffr false if
> !__this_cpu_read(efi_sm_state), leave it true otherwise.
> - if (__this_cpu_read(efi_sm_state)) {
> + if (__this_cpu_read(efi_sm_state))
> sysreg_clear_set_s(SYS_SVCR,
> 0,
> SVCR_SM_MASK);
> - if (!system_supports_fa64())
> - ffr = efi_sm_state;
> - }
> + else
> + ffr = false;
In the case where we support FA64 we need to load FFR so this
needs to be conditional on system_supports_fa64() in the case
where efi_sm_state is true.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20220602/258c93ba/attachment-0001.sig>
More information about the linux-arm-kernel
mailing list