Skip to content

Commit f476b52

Browse files
P33Mpopcornmix
authored andcommitted
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 024b072 commit f476b52

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
@@ -96,12 +96,17 @@ void bcm2836_arm_irqchip_spin_gpu_irq(void)
9696
u32 i;
9797
void __iomem *gpurouting = (intc.base + LOCAL_GPU_ROUTING);
9898
u32 routing_val = readl(gpurouting);
99+
u32 irq_route;
100+
101+
/* Preserve FIQ routing bits */
102+
irq_route = routing_val & 0x3;
103+
routing_val &= ~0x3;
99104

100105
for (i = 1; i <= 3; i++) {
101-
u32 new_routing_val = (routing_val + i) & 3;
106+
irq_route = (irq_route + i) & 0x3;
102107

103-
if (cpu_active(new_routing_val)) {
104-
writel(new_routing_val, gpurouting);
108+
if (cpu_active(irq_route)) {
109+
writel(irq_route | routing_val, gpurouting);
105110
return;
106111
}
107112
}

0 commit comments

Comments
 (0)