Skip to content

Commit 6d97c1c

Browse files
committed
drivers: irq-bcm2836: preserve unrelated bits in LOCAL_GPU_ROUTING
Interrupts are dispatched round-robin but doing so trampled FIQ routing. Taking a FIQ on a core without a handler installed is fatal. Only modify bits 1:0 which are the IRQ route bits. Signed-off-by: Jonathan Bell <[email protected]>
1 parent 51dac87 commit 6d97c1c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

drivers/irqchip/irq-bcm2836.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,17 @@ void bcm2836_arm_irqchip_spin_gpu_irq(void)
9494
u32 i;
9595
void __iomem *gpurouting = (intc.base + LOCAL_GPU_ROUTING);
9696
u32 routing_val = readl(gpurouting);
97+
u32 irq_route;
98+
99+
/* Preserve FIQ routing bits */
100+
irq_route = routing_val & 0x3;
101+
routing_val &= ~0x3;
97102

98103
for (i = 1; i <= 3; i++) {
99-
u32 new_routing_val = (routing_val + i) & 3;
104+
irq_route = (irq_route + i) & 0x3;
100105

101-
if (cpu_active(new_routing_val)) {
102-
writel(new_routing_val, gpurouting);
106+
if (cpu_active(irq_route)) {
107+
writel(irq_route | routing_val, gpurouting);
103108
return;
104109
}
105110
}

0 commit comments

Comments
 (0)