Marc Zyngier
892f7237b3
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 <broonie@kernel.org>
Reviewed-by: Peter Collingbourne <pcc@google.com>
Tested-by: Peter Collingbourne <pcc@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220720105219.1755096-1-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
2022-07-25 11:02:11 +01:00
..
2022-06-24 17:18:11 +01:00
2022-04-29 19:26:27 +01:00
2022-06-28 17:41:44 +01:00
2022-07-01 12:07:43 +01:00
2020-03-25 11:50:48 +01:00
2022-07-19 19:10:28 +01:00
2021-04-08 16:04:22 -07:00
2022-06-27 12:22:31 +01:00
2022-07-05 11:45:45 +01:00
2022-07-04 12:18:47 +01:00
2021-12-08 14:54:07 +00:00
2021-09-01 10:29:10 +02:00
2022-07-25 10:57:37 +01:00
2020-03-24 17:24:19 +00:00
2021-10-01 13:31:00 +01:00
2022-07-25 11:02:11 +01:00
2022-06-23 14:19:33 +01:00
2022-07-25 11:02:11 +01:00
2022-03-07 21:25:47 +00:00
2022-04-29 14:37:59 -07:00
2022-04-29 19:26:27 +01:00
2021-05-25 19:27:49 +01:00
2020-11-17 16:14:20 +00:00
2020-05-28 18:03:40 +01:00
2021-08-04 16:54:36 +00:00
2022-04-28 11:37:06 +01:00
2022-05-24 10:18:23 -07:00
2022-04-22 18:51:02 +01:00
2022-06-15 16:14:47 +01:00
2022-06-24 13:08:30 +01:00
2022-06-29 10:29:30 +01:00
2022-06-15 16:14:47 +01:00
2022-07-20 16:08:10 +01:00
2021-10-01 13:31:00 +01:00
2022-07-07 10:48:37 +01:00
2022-04-29 19:26:27 +01:00
2022-07-25 10:59:15 +01:00
2021-06-24 14:01:55 +01:00
2022-07-25 10:59:15 +01:00
2022-06-29 10:21:23 +01:00
2020-09-07 15:00:52 +01:00
2019-06-19 17:09:07 +02:00
2021-03-24 20:19:30 +00:00
2021-06-11 11:19:27 +01:00
2022-06-24 17:18:11 +01:00
2020-11-10 13:11:44 +00:00
2022-04-29 19:26:27 +01:00
2022-06-23 16:01:42 +01:00
2022-05-07 19:54:33 +01:00
2022-05-07 19:54:33 +01:00
2022-07-25 10:59:15 +01:00
2022-04-04 10:32:50 +01:00
2022-03-24 19:06:48 -07:00
2022-07-07 10:48:37 +01:00
2022-05-17 14:23:37 +01:00
2022-04-08 11:43:46 +01:00
2021-08-23 10:59:26 +01:00
2022-01-12 16:26:58 -08:00
2022-03-08 11:40:44 +00:00
2020-11-09 18:12:34 +01:00
2021-07-28 18:33:49 +01:00
2022-06-03 16:03:05 -07:00
2022-04-08 11:46:46 +01:00
2021-04-08 16:04:22 -07:00
2022-05-16 19:50:20 +01:00
2019-06-19 17:09:55 +02:00
2020-05-04 12:46:03 +01:00
2022-05-17 14:25:35 +01:00
2021-12-10 14:06:04 +00:00
2021-10-01 13:30:59 +01:00
2022-07-20 16:08:10 +01:00
2022-04-22 12:14:05 +02:00
2022-06-27 10:28:12 +01:00
2022-07-01 12:05:45 +01:00
2022-07-01 15:22:51 +01:00
2021-07-21 11:23:25 +01:00
2021-05-25 19:27:49 +01:00
2022-05-06 21:01:17 +02:00
2022-06-27 10:51:34 +01:00
2022-06-24 17:18:10 +01:00
2019-06-19 17:09:08 +02:00
2022-04-29 19:26:27 +01:00
2019-06-19 17:09:07 +02:00
2022-05-16 19:50:20 +01:00
2021-12-10 14:06:04 +00:00
2021-10-15 11:25:15 +02:00
2017-11-02 11:10:55 +01:00
2022-07-05 11:45:45 +01:00
2021-01-20 12:18:46 +00:00
2021-01-20 12:18:46 +00:00
2021-04-15 14:00:38 +01:00
2022-07-25 10:59:15 +01:00