]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip: armada-370-xp: Fix MPIC interrupt handling
authorGrzegorz Jaszczyk <jaz@semihalf.com>
Thu, 25 Sep 2014 11:17:19 +0000 (13:17 +0200)
committerJason Cooper <jason@lakedaemon.net>
Sun, 2 Nov 2014 01:31:10 +0000 (01:31 +0000)
commit6da3bd68c3b998a4a0bd7f5f4c45d207cb4b2694
tree9ef9ea237bac7ce06e1e472905d128b72a0d8bf5
parent3b295e174e61d8a7b600798f3bb9a1eefab44758
irqchip: armada-370-xp: Fix MPIC interrupt handling

In both Armada-375 and Armada-38x MPIC interrupts should be identified by
reading cause register multiplied by the interrupt mask.

A lack of above mentioned multiplication resulted in a bug, caused by the
fact that in Armada-375 and Armada-38x some of the interrupts
(e.g. network interrupts) can be handled either as a GIC or MPIC interrupts.
Therefore during MPIC interrupts handling, cause register shows hits from
interrupts even if they are masked for MPIC but unmasked for a GIC.

This resulted in 'bad IRQ' error, because masked MPIC interrupt without
registered interrupt handler, was trying to be handled during interrupt
handling procedure of some other unmasked MPIC interrupt (e.g. local timer
irq).

This commit fixes that by ensuring that during MPIC interrupt handling only
interrupts that are unmasked for MPIC are processed.

Signed-off-by: Grzegorz Jaszczyk <jaz@semihalf.com>
Reviewed-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Fixes: b7a39ce791af ("irqchip: armada-370-xp: Setup a chained handler for the MPIC")
Cc: <stable@vger.kernel.org> # v3.15+
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Link: https://lkml.kernel.org/r/1411643839-64925-3-git-send-email-jaz@semihalf.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
drivers/irqchip/irq-armada-370-xp.c