linux/drivers/irqchip
Lior Amsalem a6f089e95b irqchip: armada-370-xp: fix IPI race condition
In the Armada 370/XP driver, when we receive an IRQ 0, we read the
list of doorbells that caused the interrupt from register
ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS. This gives the list of IPIs that
were generated. However, instead of acknowledging only the IPIs that
were generated, we acknowledge *all* the IPIs, by writing
~IPI_DOORBELL_MASK in the ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS register.

This creates a race condition: if a new IPI that isn't part of the
ones read into the temporary "ipimask" variable is fired before we
acknowledge all IPIs, then we will simply loose it. This is causing
scheduling hangs on SMP intensive workloads.

It is important to mention that this ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS
register has the following behavior: "A CPU write of 0 clears the bits
in this field. A CPU write of 1 has no effect". This is what allows us
to simply write ~ipimask to acknoledge the handled IPIs.

Notice that the same problem is present in the MSI implementation, but
it will be fixed as a separate patch, so that this IPI fix can be
pushed to older stable versions as appropriate (all the way to 3.8),
while the MSI code only appeared in 3.13.

Signed-off-by: Lior Amsalem <alior@marvell.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: stable@vger.kernel.org # v3.8+
Fixes: 344e873e56 'arm: mvebu: Add IPI support via doorbells'
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
2013-12-13 16:34:04 +00:00
..
exynos-combiner.c irqchip: exynos: cleanup non-DT stuff in exynos-combiner 2013-07-16 12:30:40 +09:00
irq-armada-370-xp.c irqchip: armada-370-xp: fix IPI race condition 2013-12-13 16:34:04 +00:00
irq-bcm2835.c irqchip: bcm2835: Convert to use IRQCHIP_DECLARE macro 2013-11-07 10:37:37 +01:00
irq-gic.c ARM: GIC: interface to send a SGI directly 2013-09-23 18:47:28 -04:00
irq-imgpdc.c irq-imgpdc: add ImgTec PDC irqchip driver 2013-08-21 14:17:56 +01:00
irq-metag-ext.c metag: Internal and external irqchips 2013-03-02 20:09:48 +00:00
irq-metag.c metag: Internal and external irqchips 2013-03-02 20:09:48 +00:00
irq-mmp.c irqchip: mmp: avoid to include irqs head file 2013-08-24 17:45:47 +08:00
irq-moxart.c irqchip: Add support for MOXA ART SoCs 2013-07-05 11:39:25 +02:00
irq-mxs.c ARM: mxs: icoll: Fix interrupts gpio bank 0 2013-06-03 23:18:15 +08:00
irq-nvic.c irqchip: nvic: Fix wrong num_ct argument for irq_alloc_domain_generic_chips() 2013-07-05 11:39:24 +02:00
irq-orion.c irqchip: Add support for Marvell Orion SoCs 2013-06-11 16:18:50 +02:00
irq-renesas-intc-irqpin.c ARM: shmobile: irqpin: add a DT property to enable masking on parent 2013-06-19 21:27:31 +09:00
irq-renesas-irqc.c irqchip: renesas-irqc: Fix irqc_probe error handling 2013-06-06 10:23:58 +09:00
irq-s3c24xx.c ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
irq-sirfsoc.c irqchip: sirf: move from legacy mode to linear irqdomain 2013-08-29 09:48:32 -07:00
irq-sun4i.c irqchip: sun4i: Staticize sun4i_irq_ack() 2013-07-05 11:39:24 +02:00
irq-tb10x.c irqchip: Add TB10x interrupt controller driver 2013-06-25 18:54:21 +02:00
irq-versatile-fpga.c irqchip: Return -EPERM for reserved IRQs 2013-06-08 21:34:16 +01:00
irq-vic.c irqchip: vic: Parse interrupt and resume masks from device tree 2013-09-17 06:48:27 +09:00
irq-vt8500.c irqchip: vt8500: Staticize local symbols 2013-07-05 11:39:24 +02:00
irqchip.c irqchip: add basic infrastructure 2013-01-10 11:44:38 -06:00
irqchip.h irqchip: add basic infrastructure 2013-01-10 11:44:38 -06:00
Kconfig irq-imgpdc: add ImgTec PDC irqchip driver 2013-08-21 14:17:56 +01:00
Makefile ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
spear-shirq.c ARM: spear: use common irqchip_init function 2013-01-12 10:52:15 -06:00