linux/drivers/irqchip
Sven Peter 60a1cd10b2 irqchip/apple-aic: Fix irq_disable from within irq handlers
When disable_irq_nosync for an interrupt is called from within its
interrupt handler, this interrupt is only marked as disabled with the
intention to mask it when it triggers again.
The AIC hardware however automatically masks the interrupt when it is read.
aic_irq_eoi then unmasks it again if it's not disabled *and* not masked.
This results in a state mismatch between the hardware state and the
state kept in irq_data: The hardware interrupt is masked but
IRQD_IRQ_MASKED is not set. Any further calls to unmask_irq will directly
return and the interrupt can never be enabled again.

Fix this by keeping the hardware and irq_data state in sync by unmasking in
aic_irq_eoi if and only if the irq_data state also assumes the interrupt to
be unmasked.

Fixes: 76cde26394 ("irqchip/apple-aic: Add support for the Apple Interrupt Controller")
Signed-off-by: Sven Peter <sven@svenpeter.dev>
Acked-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210812100942.17206-1-sven@svenpeter.dev
2021-08-20 14:32:33 +01:00
..
alphascale_asm9260-icoll.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
exynos-combiner.c Merge branch irq/generic_handle_domain_irq-core into irq/irqchip-next 2021-06-11 14:32:12 +01:00
irq-al-fic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-alpine-msi.c irqchip/alpine-msi: Fix freeing of interrupts on allocation error path 2020-12-11 14:45:22 +00:00
irq-apple-aic.c irqchip/apple-aic: Fix irq_disable from within irq handlers 2021-08-20 14:32:33 +01:00
irq-armada-370-xp.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-aspeed-i2c-ic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-aspeed-scu-ic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-aspeed-vic.c irq: Fix typos in comments 2021-03-22 04:23:14 +01:00
irq-ath79-cpu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq-ath79-misc.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ativic32.c irqchip/ativic32: Constify irq_domain_ops 2020-07-27 08:55:02 +01:00
irq-atmel-aic5.c irqchip/atmel-aic5: Add support for sam9x60 rtt fixup 2020-06-27 11:55:45 +01:00
irq-atmel-aic-common.c
irq-atmel-aic-common.h
irq-atmel-aic.c irqchip/atmel-aic: Fix irq_retrigger callback return value 2020-03-16 15:48:54 +00:00
irq-bcm2835.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-bcm2836.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-bcm6345-l1.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq-bcm7038-l1.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-bcm7120-l2.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-brcmstb-l2.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-clps711x.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irq-crossbar.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq-csky-apb-intc.c irq: Fix typos in comments 2021-03-22 04:23:14 +01:00
irq-csky-mpintc.c Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-07-08 11:01:13 -07:00
irq-davinci-aintc.c
irq-davinci-cp-intc.c
irq-digicolor.c
irq-dw-apb-ictl.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ftintc010.c
irq-gic-common.c irqchip/gic: Split vGIC probing information from the GIC code 2021-06-01 10:45:58 +01:00
irq-gic-common.h irqchip/gic: Split vGIC probing information from the GIC code 2021-06-01 10:45:58 +01:00
irq-gic-pm.c irqchip: gic-pm: Remove redundant error log of clock bulk 2021-06-11 14:21:04 +01:00
irq-gic-realview.c
irq-gic-v2m.c irqchip/gic-v2m: Remove unnecessary oom message 2021-06-11 14:19:32 +01:00
irq-gic-v3-its-fsl-mc-msi.c bus: fsl-mc: Add ACPI support for fsl-mc 2020-07-28 15:51:32 +01:00
irq-gic-v3-its-pci-msi.c irqchip/gic-v3-its: Flag device allocation as proxied if behind a PCI bridge 2020-12-11 14:47:50 +00:00
irq-gic-v3-its-platform-msi.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
irq-gic-v3-its.c irqchip/gic-v3-its: Remove unnecessary oom message 2021-06-11 14:19:39 +01:00
irq-gic-v3-mbi.c irqchip/gic-v3: Fix OF_BAD_ADDR error handling 2021-04-07 13:25:52 +01:00
irq-gic-v3.c ARM: 2021-06-28 15:40:51 -07:00
irq-gic-v4.c irqchip/gic-v4.1: Disable vSGI upon (GIC CPUIF < v4.1) detection 2021-04-22 15:55:21 +01:00
irq-gic.c Updates for the interrupt subsystem: 2021-06-29 12:25:04 -07:00
irq-goldfish-pic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-hip04.c irqchip/hisi: Use the correct HiSilicon copyright 2021-04-07 13:25:52 +01:00
irq-i8259.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-idt3243x.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-imgpdc.c Merge branch irq/generic_handle_domain_irq-core into irq/irqchip-next 2021-06-11 14:32:12 +01:00
irq-imx-gpcv2.c irqchip/irq-imx-gpcv2: Remove unnecessary oom message 2021-06-11 14:19:47 +01:00
irq-imx-intmux.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-imx-irqsteer.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ingenic-tcu.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ingenic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ixp4xx.c irqchip/ixp4xx: Register the base PA instead of its VA in fwnode 2019-08-07 14:24:41 +01:00
irq-jcore-aic.c irqchip/jcore-aic: Kill use of irq_create_strict_mappings() 2021-04-22 15:55:22 +01:00
irq-keystone.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-loongson-htpic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-loongson-htvec.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-loongson-liointc.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-loongson-pch-msi.c irqchip/loongson-pch-msi: Use bitmap_zalloc() to allocate bitmap 2021-02-09 10:41:40 +00:00
irq-loongson-pch-pic.c irqchip/loongson-pch-pic: Improve edge triggered interrupt support 2021-08-12 07:57:23 +01:00
irq-lpc32xx.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ls1x.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ls-extirq.c irqchip/ls-extirq: add IRQCHIP_SKIP_SET_WAKE to the irqchip flags 2021-01-29 11:06:38 +00:00
irq-ls-scfg-msi.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-madera.c
irq-mbigen.c irqchip/mbigen: Fix compile warning when CONFIG_ACPI is disabled 2021-06-06 13:59:09 +01:00
irq-meson-gpio.c irq: Fix typos in comments 2021-03-22 04:23:14 +01:00
irq-mips-cpu.c irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry 2021-07-09 10:18:58 +01:00
irq-mips-gic.c irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry 2021-07-09 10:18:58 +01:00
irq-mmp.c irqchip/mmp: Coexist with GIC root IRQ controller 2019-08-30 15:23:30 +01:00
irq-mscc-ocelot.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-mst-intc.c irqchip/irq-mst: Support polarity configuration 2021-04-07 13:26:00 +01:00
irq-mtk-cirq.c irq: Fix typos in comments 2021-03-22 04:23:14 +01:00
irq-mtk-sysirq.c irqchip/mtk-sysirq: Skip setting irq-wake 2021-08-12 08:15:15 +01:00
irq-mvebu-gicp.c
irq-mvebu-icu.c irqchip: Remove redundant error printing 2021-05-16 13:07:18 +01:00
irq-mvebu-odmi.c
irq-mvebu-pic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-mvebu-sei.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-mxs.c irq: Fix typos in comments 2021-03-22 04:23:14 +01:00
irq-nvic.c irqchip/nvic: Convert from handle_IRQ() to handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-omap-intc.c
irq-ompic.c
irq-or1k-pic.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
irq-orion.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-owl-sirq.c irqchip: Add Actions Semi Owl SIRQ controller 2020-09-25 16:57:33 +01:00
irq-partition-percpu.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-pic32-evic.c irqchip/mips: Fix RCU violation when using irqdomain lookup on interrupt entry 2021-07-09 10:18:58 +01:00
irq-pruss-intc.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-rda-intc.c
irq-realtek-rtl.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-renesas-h8s.c
irq-renesas-h8300h.c
irq-renesas-intc-irqpin.c irqchip/renesas-intc-irqpin: Merge irlm_bit and needs_irlm 2020-11-01 11:59:22 +00:00
irq-renesas-irqc.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-renesas-rza1.c irqchip/renesas-rza1: Fix an use-after-free in rza1_irqc_probe() 2019-07-26 14:40:01 +01:00
irq-riscv-intc.c irqchip/riscv-intc: Fix a typo in a pr_warn() 2020-06-21 15:15:41 +01:00
irq-sa11x0.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq-sifive-plic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-sl28cpld.c irqchip/irq-sl28cpld: Convert comma to semicolon 2020-12-18 17:43:47 +00:00
irq-sni-exiu.c irqchip/exiu: Fix the index of fwspec for IRQ type 2020-11-22 10:27:23 +00:00
irq-st.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq-stm32-exti.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-sun4i.c irqchip/sun4i: Remove unnecessary oom message 2021-06-11 14:19:51 +01:00
irq-sun6i-r.c irqchip/sun6i-r: Add wakeup support 2021-01-21 20:21:49 +00:00
irq-sunxi-nmi.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-tb10x.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-tegra.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
irq-ti-sci-inta.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-ti-sci-intr.c irqchip/ti-sci-intr: Fix freeing of irqs 2020-12-11 14:47:50 +00:00
irq-ts4800.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-uniphier-aidet.c irqchip/uniphier-aidet: Use devm_platform_ioremap_resource() 2019-09-05 09:28:13 +01:00
irq-versatile-fpga.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-vf610-mscm-ir.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
irq-vic.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-vt8500.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
irq-wpcm450-aic.c irqchip: Add driver for WPCM450 interrupt controller 2021-04-07 13:26:00 +01:00
irq-xilinx-intc.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
irq-xtensa-mx.c
irq-xtensa-pic.c
irq-zevio.c irqchip: Remove redundant semicolon after while 2019-11-10 18:47:44 +00:00
irqchip.c treewide: Convert macro and uses of __section(foo) to __section("foo") 2020-10-25 14:51:49 -07:00
Kconfig irqchip/qcom-pdc: Switch to IRQCHIP_PLATFORM_DRIVER and allow as a module 2021-06-06 13:57:41 +01:00
Makefile ARM: platform support for Apple M1 2021-04-26 12:30:36 -07:00
qcom-irq-combiner.c irqchip: Bulk conversion to generic_handle_domain_irq() 2021-06-10 13:09:19 +01:00
qcom-pdc.c irqchip/qcom-pdc: Switch to IRQCHIP_PLATFORM_DRIVER and allow as a module 2021-06-06 13:57:41 +01:00
spear-shirq.c