Commit 42969893 authored by Matt Redfearn's avatar Matt Redfearn Committed by Marc Zyngier

irqchip/mips-gic: Fix Local compare interrupt

Commit 4cfffcfa ("irqchip/mips-gic: Fix local interrupts") added
mapping of several local interrupts during initialisation of the gic
driver. This associates virq numbers with these interrupts.
Unfortunately, as not all of the interrupts are mapped in hardware
order, when drivers subsequently request these interrupts they conflict
with the mappings that have already been set up. For example, this
manifests itself in the gic clocksource driver, which fails to probe
with the message:

clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0x7350c9738,
max_idle_ns: 440795203769 ns
GIC timer IRQ 25 setup failed: -22

This is because virq 25 (the correct IRQ number specified via device
tree) was allocated to the PERFCTR interrupt (and 24 to the timer, 26 to
the FDC). To fix this, map all of these local interrupts in the hardware
order so as to associate their virq numbers with the correct hw
interrupts.

Fixes: 4cfffcfa ("irqchip/mips-gic: Fix local interrupts")
Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent fa23b9d1
...@@ -991,8 +991,12 @@ static void __init gic_map_single_int(struct device_node *node, ...@@ -991,8 +991,12 @@ static void __init gic_map_single_int(struct device_node *node,
static void __init gic_map_interrupts(struct device_node *node) static void __init gic_map_interrupts(struct device_node *node)
{ {
gic_map_single_int(node, GIC_LOCAL_INT_WD);
gic_map_single_int(node, GIC_LOCAL_INT_COMPARE);
gic_map_single_int(node, GIC_LOCAL_INT_TIMER); gic_map_single_int(node, GIC_LOCAL_INT_TIMER);
gic_map_single_int(node, GIC_LOCAL_INT_PERFCTR); gic_map_single_int(node, GIC_LOCAL_INT_PERFCTR);
gic_map_single_int(node, GIC_LOCAL_INT_SWINT0);
gic_map_single_int(node, GIC_LOCAL_INT_SWINT1);
gic_map_single_int(node, GIC_LOCAL_INT_FDC); gic_map_single_int(node, GIC_LOCAL_INT_FDC);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment