Mark Rutland bc9bbb7880 arm64: Explicitly save/restore CPACR when probing SVE and SME
When a CPUs onlined we first probe for supported features and
propetites, and then we subsequently enable features that have been
detected. This is a little problematic for SVE and SME, as some
properties (e.g. vector lengths) cannot be probed while they are
disabled. Due to this, the code probing for SVE properties has to enable
SVE for EL1 prior to proving, and the code probing for SME properties
has to enable SME for EL1 prior to probing. We never disable SVE or SME
for EL1 after probing.

It would be a little nicer to transiently enable SVE and SME during
probing, leaving them both disabled unless explicitly enabled, as this
would make it much easier to catch unintentional usage (e.g. when they
are not present system-wide).

This patch reworks the SVE and SME feature probing code to only
transiently enable support at EL1, disabling after probing is complete.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2023-10-16 14:16:53 +01:00
..
2023-08-30 13:34:34 -07:00
2023-06-06 17:39:05 +01:00
2023-07-03 15:32:22 -07:00
2020-09-07 15:00:52 +01:00
2023-04-28 14:02:54 -07:00
2022-09-26 10:13:14 -07:00
2023-08-28 17:34:54 -07:00
2023-08-31 12:20:12 -07:00
2022-09-26 10:13:14 -07:00
2023-10-16 12:57:51 +01:00
2023-04-13 12:27:11 +01:00