Skip to content

Commit 698244b

Browse files
asdfugilKAGA-KOKO
authored andcommitted
irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so
The CPU PMU in Apple SoCs can be configured to fire its interrupt in one of several ways, and since Apple A11 one of the methods is FIQ, but the check of the configuration register fails to test explicitely for FIQ mode. It tests whether the IMODE bitfield is zero or not and the PMCRO_IACT bit is set. That results in false positives when the IMODE bitfield is not zero, but does not have the mode PMCR0_IMODE_FIQ. Only handle the PMC interrupt as a FIQ when the CPU PMU has been configured to fire FIQs, i.e. the IMODE bitfield value is PMCR0_IMODE_FIQ and PMCR0_IACT is set. Fixes: c770881 ("irqchip/apple-aic: Wire PMU interrupts") Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/all/20250118163554.16733-1-towinchenmi@gmail.com
1 parent 987f379 commit 698244b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/irqchip/irq-apple-aic.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,8 @@ static void __exception_irq_entry aic_handle_fiq(struct pt_regs *regs)
577577
AIC_FIQ_HWIRQ(AIC_TMR_EL02_VIRT));
578578
}
579579

580-
if (read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & PMCR0_IACT) {
580+
if ((read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & (PMCR0_IMODE | PMCR0_IACT)) ==
581+
(FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_FIQ) | PMCR0_IACT)) {
581582
int irq;
582583
if (cpumask_test_cpu(smp_processor_id(),
583584
&aic_irqc->fiq_aff[AIC_CPU_PMU_P]->aff))

0 commit comments

Comments
 (0)