MIPS: GIC: Generalise check for pending interrupts
authorJeffrey Deans <jeffrey.deans@imgtec.com>
Thu, 17 Jul 2014 08:20:57 +0000 (09:20 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 1 Aug 2014 22:06:41 +0000 (00:06 +0200)
commit31521a7a64bc5df5202e479ee7ba8133993ab32a
treeb0ce7b225598ff2d1890758078c61660e0480cff
parent6096e114f5f70d29d9e01e031f69d529b2193ab7
MIPS: GIC: Generalise check for pending interrupts

Move most of the functionality of gic_get_int() into a new function
gic_get_int_mask() which takes a bitmask of interrupts in which the
caller is interested, and returns the subset which are pending for the
current CPU.

This allows CP0 IRQ dispatch routines to check only the GIC interrupts
which are routed to a particular CPU interrupt input.

gic_get_int() is reimplemented using gic_get_int_mask() and is retained
for use by any platforms for which gic_get_int() is sufficient.

Signed-off-by: Jeffrey Deans <jeffrey.deans@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7376/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/gic.h
arch/mips/kernel/irq-gic.c