diff options
author | 2024-08-22 11:23:08 +0100 | |
---|---|---|
committer | 2024-08-23 12:45:45 +0200 | |
commit | 71c8e2a7c822ee557b07d9bb49028dd269c87b2e (patch) | |
tree | fa0673a33b43340fd1beef7ff7575f1db6dcc57e /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init() (diff) | |
download | wireguard-linux-71c8e2a7c822ee557b07d9bb49028dd269c87b2e.tar.xz wireguard-linux-71c8e2a7c822ee557b07d9bb49028dd269c87b2e.zip |
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: d447bf09a4013541 ("irqchip/gic-v3: Detect GICD_CTRL.DS and SCR_EL3.FIQ earlier")
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions