]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/mips-gic: Replace static map with dynamic
authorMatt Redfearn <matt.redfearn@imgtec.com>
Thu, 20 Apr 2017 09:07:36 +0000 (10:07 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 20 Apr 2017 14:07:02 +0000 (16:07 +0200)
commit4685d33b949ed31901cb1fa5a36e392113ec16bb
treea745af5f96ac08747b8b6dc099fd16cfee9bd146
parentf346100f01d2daad70c6cc4c868ff647a8e1c3e5
irqchip/mips-gic: Replace static map with dynamic

Commit 71cdb5fc4091 ("irqchip/mips-gic: Fix local interrupts") fixed
local interrupts by creating virq mappings for them all at startup.
Unfortunately this change broke legacy IRQ controllers in the same
system, such as the i8259 on the Malta platform, as it allocates virq
numbers that were expected to be available for the legacy controller.

Instead of creating the mappings statically when the GIC is probed,
re-introduce the irq domain .map function, removed by commit 52f2979b5e1
("irqchip/mips-gic: Fix local interrupts") and use it to set up the irq
handler and chip. Since a good deal of the required functionality is
already implemented by gic_irq_domain_alloc, repurpose that function for
gic_irq_domain_map and add a new gic_irq_domain_alloc which wraps
gic_irq_domain_map with the necessary conversion.

This change fixes the legacy interrupt controller of the Malta platform
without breaking the perf interrupt fixed by commit 52f2979b5e1
("irqchip/mips-gic: Fix local interrupts").

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Link: http://lkml.kernel.org/r/1492679256-14513-4-git-send-email-matt.redfearn@imgtec.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
drivers/irqchip/irq-mips-gic.c