]> git.karo-electronics.de Git - karo-tx-linux.git/commit
irqchip: mips-cpu: Prepare for non-legacy IRQ domains
authorPaul Burton <paul.burton@imgtec.com>
Thu, 30 Mar 2017 19:06:10 +0000 (12:06 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 12 Apr 2017 21:11:56 +0000 (23:11 +0200)
commit131735afc1838997da2c151b614b13f0352cf448
treeba6cb2783d09f92edf2a976d31e68d0207d12e2e
parentc0cfbe6941085f2ebd58e645c10f8836b6d28fe9
irqchip: mips-cpu: Prepare for non-legacy IRQ domains

The various struct irq_chip callbacks in the MIPS CPU interrupt
controller driver have been calculating the hardware interrupt number by
subtracting MIPS_CPU_IRQ_BASE from the virq number. This presumes a
linear mapping beginning from MIPS_CPU_IRQ_BASE, and this will not hold
once an IPI IRQ domain is introduced. Switch to using the hwirq field of
struct irq_data which already contains the hardware interrupt number
instead of attempting to calculate it.

Similarly, plat_irq_dispatch calculated the virq number by adding
MIPS_CPU_IRQ_BASE to the hardware interrupt number. Ready this for the
introduction of an IPI IRQ domain by instead using irq_linear_revmap.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15835/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
drivers/irqchip/irq-mips-cpu.c