Commit 71c8e2a
irqchip/gic-v3: Init SRE before poking sysregs
The GICv3 driver pokes GICv3 system registers in gic_prio_init() before
gic_cpu_sys_reg_init() ensures that GICv3 system registers have been
enabled by writing to ICC_SRE_EL1.SRE.
On arm64 this is benign as has_useable_gicv3_cpuif() runs earlier during
cpufeature detection, and this enables the GICv3 system registers.
On 32-bit arm when booting on an FVP using the boot-wrapper, the accesses
in gic_prio_init() end up being UNDEFINED and crashes the kernel during
boot.
This is a regression introduced by the addition of gic_prio_init().
Fix this by factoring out the SRE initialization into a new function and
calling it early in the three paths where SRE may not have been
initialized:
(1) gic_init_bases(), before the primary CPU pokes GICv3 sysregs in
gic_prio_init().
(2) gic_starting_cpu(), before secondary CPUs initialize GICv3 sysregs
in gic_cpu_init().
(3) gic_cpu_pm_notifier(), before CPUs re-initialize GICv3 sysregs in
gic_cpu_sys_reg_init().
Fixes: d447bf0 ("irqchip/gic-v3: Detect GICD_CTRL.DS and SCR_EL3.FIQ earlier")
Signed-off-by: Mark Rutland <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Marc Zyngier <[email protected]>
Cc: [email protected]1 parent c5af2c9 commit 71c8e2a
1 file changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1154 | 1154 | | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | | - | |
| 1157 | + | |
1158 | 1158 | | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
1164 | | - | |
1165 | 1159 | | |
1166 | 1160 | | |
1167 | 1161 | | |
| |||
1172 | 1166 | | |
1173 | 1167 | | |
1174 | 1168 | | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
| 1173 | + | |
| 1174 | + | |
| 1175 | + | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
1175 | 1179 | | |
1176 | 1180 | | |
1177 | 1181 | | |
| |||
1333 | 1337 | | |
1334 | 1338 | | |
1335 | 1339 | | |
| 1340 | + | |
1336 | 1341 | | |
1337 | 1342 | | |
1338 | 1343 | | |
| |||
1498 | 1503 | | |
1499 | 1504 | | |
1500 | 1505 | | |
| 1506 | + | |
1501 | 1507 | | |
1502 | 1508 | | |
1503 | 1509 | | |
| |||
2070 | 2076 | | |
2071 | 2077 | | |
2072 | 2078 | | |
| 2079 | + | |
2073 | 2080 | | |
2074 | 2081 | | |
2075 | 2082 | | |
| |||
0 commit comments