arm64/fpsimd: Ensure that offlined CPUs are not using SME

When we use CPU hotplug to offline a CPU we may transition directly from
running a task which was using SME to the CPU being offlined. This means
that PSTATE.{SM,ZA} may still be set, indicating to the system that SME is
still in use. This could create contention with other still running CPUs if
the system uses shared SMCUs.

For most systems this shouldn't be an issue, we should have PSCI or some
other power management mechanism which will take care of this as part of
offlining the CPU. However we do still have support for spin tables, and it
is possible that system firmware may not be ideally implemented, so let's
explicitly disable SME during the process of offlining the CPU in order to
ensure there's no spurious contention.

Signed-off-by: Mark Brown <broonie@kernel.org>
1 file changed