]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Netlogic: Fix plat_irq_dispatch
authorJayachandran C <jchandra@broadcom.com>
Mon, 10 Jun 2013 06:41:10 +0000 (06:41 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Thu, 13 Jun 2013 15:46:43 +0000 (17:46 +0200)
commita195863fa18fc7520b52bd7f37830e73d5843bf9
tree3ae51e9c8896f3d00fcdb51939d0157fa032ffa8
parentfce2ff2437dcef6cb9690e24bff8158bb7218152
MIPS: Netlogic: Fix plat_irq_dispatch

Fix an issue in plat_irq_dispatch due to which it can call do_IRQ
with a PIC irq that is not mapped.

When a per-cpu interrupt and a PIC interrupt are both active, the
check 'eirr & PERCPU_IRQ_MASK' will be true, but the interrupt in 'i'
will be the number of the PIC interrupt. In this case, we will call
do_IRQ on the PIC interrupt without mapping it with nlm_irq_to_xirq().

Fix this by using __ffs64 instead of __ilog2_u64 and using the
interrupt number instead of mask to identify per-cpu interrupts.

Signed-off-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5432/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/netlogic/common/irq.c