]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so
authorNick Chan <towinchenmi@gmail.com>
Sat, 18 Jan 2025 16:31:42 +0000 (00:31 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:51 +0000 (13:49 +0100)
commit2e432c894863a80e2344b334b792c8ac6a7eb4d2
treeb6371e0798e71437a3c1c3e8bf7e294b52a87ba6
parent3faa17654dec26b9258fa7e0a7b4f0ef8b5fe57d
irqchip/apple-aic: Only handle PMC interrupt as FIQ when configured so

commit 698244bbb3bfd32ddf9a0b70a12b1c7d69056497 upstream.

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: c7708816c944 ("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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/irqchip/irq-apple-aic.c