zephyr/drivers/interrupt_controller
Dino Li ce7c7bb5f9 it8xxx2: intc: protect interrupt enable registers of soc
Because these two functions are called from threads and ISR.
And they run a bit-wise OR operation on the interrupt registers.
So protect them to prevent race condition between thread and ISR
context where causing an interrupt won't enable as expected.

eg.
- Pseudo code of thread enable IER1's bit1:
1. load word from IER1 (0x40) and write into CPU register S1
   => S1=0x40
2. Or S1's bit1
   => S1=0x42
(But if an interrupt is triggered here)
3. Store word to IER1 from S1
   => IER1=0x42
(IER1 will be 0x42 not 0x43, IER1's bit0 is disable again due to the
race condition above)

-Pseudo code of ISR enable IER1's bit0
1. load word from IER1 (0x40) write into CPU register S2
   => S2=0x40
2. Or S2's bit0
   => S2=0x41
3. Store word to IER1 from S2
   => IER1=0x41
4. Go back to thread.

Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
2021-07-20 20:00:39 -04:00
..
CMakeLists.txt esp32: drivers: interrupt_controller: add interrupt allocation support 2021-07-16 07:19:28 -04:00
intc_arcv2_irq_unit.c pm: remove callback from control function 2021-07-13 09:36:45 -04:00
intc_cavs.c drivers: interrupt_controller: remove usage of device_pm_control_nop 2021-04-28 10:55:49 -04:00
intc_cavs.h
intc_dw.c drivers: interrupt_controller: remove usage of device_pm_control_nop 2021-04-28 10:55:49 -04:00
intc_dw.h
intc_esp32.c esp32: drivers: interrupt_controller: add interrupt allocation support 2021-07-16 07:19:28 -04:00
intc_exti_stm32.c drivers: interrupt_controller: remove usage of device_pm_control_nop 2021-04-28 10:55:49 -04:00
intc_gic_common_priv.h drivers: gicv3: fix getting rdist base address 2021-04-26 13:42:43 +02:00
intc_gic.c intc: gic: Don't enable the interrupt routing to cores disable in DT 2021-04-27 13:32:55 -04:00
intc_gicv3_priv.h drivers: gicv3: fix getting rdist base address 2021-04-26 13:42:43 +02:00
intc_gicv3.c drivers: gicv3: fix getting rdist base address 2021-04-26 13:42:43 +02:00
intc_intel_vtd.c drivers: interrupt_controller: remove usage of device_pm_control_nop 2021-04-28 10:55:49 -04:00
intc_intel_vtd.h drivers/interrupt_controller: Add Intel VT-D interrupt remapping driver 2020-12-08 09:29:20 -05:00
intc_ioapic_priv.h drivers/interrupt_controller: Get the IOAPIC RTEs dynamically 2021-03-12 09:23:08 -05:00
intc_ioapic.c pm: remove callback from control function 2021-07-13 09:36:45 -04:00
intc_irqmp.c intc: Add support for GRLIB IRQMP 2020-11-13 14:53:55 -08:00
intc_ite_it8xxx2.c it8xxx2: intc: protect interrupt enable registers of soc 2021-07-20 20:00:39 -04:00
intc_ite_it8xxx2.h drivers: gpio: ite_it8xxx2: enable more gpio groups 2021-04-23 06:31:56 -04:00
intc_loapic_spurious.S intc: loapic: mark data and functions as boot/pinned 2021-05-10 16:00:43 -05:00
intc_loapic.c pm: remove callback from control function 2021-07-13 09:36:45 -04:00
intc_miwu.c dts: npcx: replace series-prefix 'npcx7-' with famliy-prefix 'npcx-' 2021-06-04 16:14:48 -05:00
intc_plic.c
intc_rv32m1_intmux.c drivers: interrupt_controller: remove usage of device_pm_control_nop 2021-04-28 10:55:49 -04:00
intc_sam0_eic_priv.h
intc_sam0_eic.c drivers: interrupt_controller: remove usage of device_pm_control_nop 2021-04-28 10:55:49 -04:00
intc_shared_irq.c drivers: interrupt_controller: intc_shared: cond. forward sense cell 2021-05-07 12:41:04 -05:00
intc_swerv_pic.c
intc_system_apic.c intc: system_apic: mark functions as boot/pinned 2021-05-10 16:00:43 -05:00
intc_vexriscv_litex.c drivers: gpio_litex: add support for litex_vexriscv GPIO interrupts 2021-06-04 16:24:52 -05:00
Kconfig esp32: drivers: interrupt_controller: add interrupt allocation support 2021-07-16 07:19:28 -04:00
Kconfig.cavs
Kconfig.dw
Kconfig.esp32 esp32: drivers: interrupt_controller: add interrupt allocation support 2021-07-16 07:19:28 -04:00
Kconfig.gic drivers: gicv3: GIC with single secure mode 2021-04-13 07:47:44 -04:00
Kconfig.intel_vtd drivers/interrupt_controller: Add Intel VT-D interrupt remapping driver 2020-12-08 09:29:20 -05:00
Kconfig.it8xxx2 drivers/interrupt: it8xxx2 driver interrupt-control 2020-12-16 08:47:36 -05:00
Kconfig.loapic drivers/interrupt_controller: Get the IOAPIC RTEs dynamically 2021-03-12 09:23:08 -05:00
Kconfig.multilevel
Kconfig.multilevel.aggregator_template
Kconfig.npcx driver: npcx7: fixed typo in Kconfig.npcx files. 2020-12-07 12:11:17 -05:00
Kconfig.rv32m1
Kconfig.sam0
Kconfig.shared_irq drivers: interrupt_controller: intc_shared: clients array size from dts 2021-05-07 12:41:04 -05:00
Kconfig.stm32