zephyr/drivers/interrupt_controller
Laurentiu Mihalcea eaa1addb5e drivers: intc: irqstr: refactor level 1 interrupt recounting
So far, it has been assumed that only level 2 interrupts can be shared
via the `CONFIG_SHARED_INTERRUPTS` option, but this is not true. In the
case of i.MX95, for instance, level 1 interrupt 143 is shared among EDMA
channels 30 and 31.

Due to the previous assumption, the irqsteer driver currently performs
reference counting for all level 2 interrupts aggregated by each
dispatcher and, of course, for the level 1 interrupts the dispatchers are
attached to. For instance, assuming a machine with 100 level 1 interrupts
and 1 irqsteer dispatcher attached to line 50 this would mean reference
counting is performed solely for line 50 (and the level 2 interrupts MUX'd
into this line).

Going back to i.MX95, since there's no dispatcher attached to IRQ line 143
that means there's no reference counting for it. In turn, this means that
the IRQ line can be disabled accidentally on a channel release() operation
while the other channel is active.

To protect against such cases, refactor the level1 interrupt reference
counting. Now, reference counting is performed for _all_ level 1
interrupts.

Additionally, simplify the locking logic. Ideally, there would be a lock
for each dispatcher protecting the level 2 interrupts and 1 global lock
protecting the level 1 interrupts. Instead of this approach (which is a
bit more complex), simply use a global lock for all interrupts. If finer
granularity is required then it can be added later on.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2025-04-21 20:04:19 +02:00
..
CMakeLists.txt drivers/interrupt: Add interrupt and wake-up control drivers of it51xxx 2025-04-08 10:48:26 +02:00
intc_arcv2_irq_unit.c
intc_cavs.c
intc_cavs.h
intc_clic.c drivers: interrupt_controller: intc_clic: add indirect access clic reg 2025-04-04 14:55:50 +02:00
intc_clic.h drivers: interrupt_controller: intc_clic: add indirect access clic reg 2025-04-04 14:55:50 +02:00
intc_clic.S driver: interrupt_controller: intc_clic: support 32 and 64 bit riscv cpu 2025-04-16 08:10:47 +02:00
intc_dw_ace.c
intc_dw.c
intc_dw.h
intc_eirq_nxp_s32.c
intc_esp32.c drivers: intc: esp32: Shared allocator for Xtensa and RISCV 2025-04-02 19:02:27 +02:00
intc_exti_stm32.c
intc_gd32_exti.c
intc_gic_common_priv.h drivers: gicv3: Add Support for Extended SPI 2025-04-09 21:09:43 +02:00
intc_gic.c drivers: interrupt_controller: do not set sgi type 2024-11-16 14:57:44 -05:00
intc_gicv3_its.c drivers: interrupt_controller: Place API into iterable section 2024-12-05 09:41:52 +01:00
intc_gicv3_priv.h drivers: gicv3: fixed typo 2025-04-09 21:09:43 +02:00
intc_gicv3.c drivers: gicv3: Add Support for Extended SPI 2025-04-09 21:09:43 +02:00
intc_gpio_stm32wb0.c
intc_intel_vtd.c drivers: interrupt_controller: Place API into iterable section 2024-12-02 22:08:07 +00:00
intc_intel_vtd.h
intc_ioapic_priv.h
intc_ioapic.c drivers: intc_ioapic: Fix Out of Bounds shift 2025-03-24 19:23:55 +01:00
intc_irqmp.c
intc_ite_it8xxx2_v2.c
intc_ite_it8xxx2.c
intc_ite_it8xxx2.h
intc_ite_it51xxx.c drivers/interrupt: Add interrupt and wake-up control drivers of it51xxx 2025-04-08 10:48:26 +02:00
intc_loapic_spurious.S
intc_loapic.c
intc_mchp_ecia_xec.c
intc_miwu.c
intc_mtk_adsp.c
intc_nrfx_clic.c
intc_nrfx_clic.S
intc_nxp_irqsteer.c drivers: intc: irqstr: refactor level 1 interrupt recounting 2025-04-21 20:04:19 +02:00
intc_nxp_pint.c
intc_plic.c drivers: intc: plic: use per-instance spinlock 2024-11-20 08:26:02 -05:00
intc_renesas_rz_ext_irq.c drivers: interrupt controller: Add support for RZ/T 2025-04-02 12:52:54 +02:00
intc_rv32m1_intmux.c
intc_sam0_eic_priv.h
intc_sam0_eic.c
intc_shared_irq.c drivers: interrupt_controller: Place API into iterable section 2024-12-02 22:08:07 +00:00
intc_swerv_pic.c
intc_system_apic.c
intc_vexriscv_litex.c
intc_vim.c drivers: interrupt-controller: vim: Compare interrupt numbers 2025-04-17 00:56:59 +02:00
intc_wch_pfic.c drivers: add the pfic interrupt controller 2024-11-26 14:41:46 +00:00
intc_wkpu_nxp_s32.c
intc_xmc4xxx.c
Kconfig drivers/interrupt: Add interrupt and wake-up control drivers of it51xxx 2025-04-08 10:48:26 +02:00
Kconfig.cavs
Kconfig.clic drivers: interrupt_controller: intc_clic: add indirect access clic reg 2025-04-04 14:55:50 +02:00
Kconfig.dw
Kconfig.esp32 drivers: intc: esp32: Shared allocator for Xtensa and RISCV 2025-04-02 19:02:27 +02:00
Kconfig.gd32_exti
Kconfig.gic drivers: gicv3: add distributor safe configuration 2024-10-24 14:08:07 +02:00
Kconfig.intel_vtd
Kconfig.it8xxx2
Kconfig.it51xxx drivers/interrupt: Add interrupt and wake-up control drivers of it51xxx 2025-04-08 10:48:26 +02:00
Kconfig.loapic
Kconfig.mtk_adsp drivers: kconfig: Fix bleeding options 2025-01-31 11:50:12 +01:00
Kconfig.multilevel
Kconfig.multilevel.aggregator_template
Kconfig.npcx
Kconfig.nxp_irqsteer drivers: interrupt_controller: intc_nxp_irqsteer: support ARM Cortex-M 2025-03-11 18:54:40 +01:00
Kconfig.nxp_pint
Kconfig.nxp_s32
Kconfig.plic
Kconfig.renesas_rz drivers: interrupt controller: Initial support for RZ/G3S 2025-02-11 10:11:15 +01:00
Kconfig.rv32m1
Kconfig.sam0
Kconfig.shared_irq
Kconfig.stm32
Kconfig.vim
Kconfig.wch_pfic drivers: add the pfic interrupt controller 2024-11-26 14:41:46 +00:00
Kconfig.xec
Kconfig.xmc4xxx
wuc_ite_it8xxx2.c
wuc_ite_it51xxx.c drivers/interrupt: Add interrupt and wake-up control drivers of it51xxx 2025-04-08 10:48:26 +02:00