aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/include/asm/arch_gicv3.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2018-03-20 09:46:42 +0000
committerMarc Zyngier <marc.zyngier@arm.com>2018-03-22 13:46:18 +0000
commit33625282adaaba93d37aa437ae9688bf0cc024a9 (patch)
tree3cfda95aa133f0ff49d11bf5682647eb4faec367 /arch/arm64/include/asm/arch_gicv3.h
parentirqchip/gic-v3: Don't try to reset AP0Rn (diff)
downloadlinux-dev-33625282adaaba93d37aa437ae9688bf0cc024a9.tar.xz
linux-dev-33625282adaaba93d37aa437ae9688bf0cc024a9.zip
irqchip/gic-v3: Probe for SCR_EL3 being clear before resetting AP0Rn
We would like to reset the Group-0 Active Priority Registers at boot time if they are available to us. They would be available if SCR_EL3.FIQ was not set, but we cannot directly probe this bit, and short of checking, we may end-up trapping to EL3, and the firmware may not be please to get such an exception. Yes, this is dumb. Instead, let's use PMR to find out if its value gets affected by SCR_EL3.FIQ being set. We use the fact that when SCR_EL3.FIQ is set, the LSB of the priority is lost due to the shifting back and forth of the actual priority. If we read back a 0, we know that Group0 is unavailable. In case we read a non-zero value, we can safely reset the AP0Rn register. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/arch_gicv3.h')
-rw-r--r--arch/arm64/include/asm/arch_gicv3.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/arm64/include/asm/arch_gicv3.h b/arch/arm64/include/asm/arch_gicv3.h
index 9becba9ab392..e278f94df0c9 100644
--- a/arch/arm64/include/asm/arch_gicv3.h
+++ b/arch/arm64/include/asm/arch_gicv3.h
@@ -76,11 +76,6 @@ static inline u64 gic_read_iar_cavium_thunderx(void)
return irqstat;
}
-static inline void gic_write_pmr(u32 val)
-{
- write_sysreg_s(val, SYS_ICC_PMR_EL1);
-}
-
static inline void gic_write_ctlr(u32 val)
{
write_sysreg_s(val, SYS_ICC_CTLR_EL1);