aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-cmp.c
diff options
context:
space:
mode:
authorMarc Zyngier <[email protected]>2022-07-20 11:52:19 +0100
committerWill Deacon <[email protected]>2022-07-25 11:02:11 +0100
commit892f7237b3ffb090f1b1f1e55fe7c50664405aed (patch)
treea354a336824ac06f7aa9f78ef1ad7aaa484ffe5a /lib/mpi/mpi-cmp.c
parentf96d67a8af7a39f7ffaac464d8bccc4c720e52c2 (diff)
arm64: Delay initialisation of cpuinfo_arm64::reg_{zcr,smcr}
Even if we are now able to tell the kernel to avoid exposing SVE/SME from the command line, we still have a couple of places where we unconditionally access the ZCR_EL1 (resp. SMCR_EL1) registers. On systems with broken firmwares, this results in a crash even if arm64.nosve (resp. arm64.nosme) was passed on the command-line. To avoid this, only update cpuinfo_arm64::reg_{zcr,smcr} once we have computed the sanitised version for the corresponding feature registers (ID_AA64PFR0 for SVE, and ID_AA64PFR1 for SME). This results in some minor refactoring. Reviewed-by: Mark Brown <[email protected]> Reviewed-by: Peter Collingbourne <[email protected]> Tested-by: Peter Collingbourne <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions