mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
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 <jonathan@raspberrypi.com>
This commit is contained in:
committed by
Dom Cobley
parent
42249db6ca
commit
df562b16fb
@@ -96,12 +96,17 @@ void bcm2836_arm_irqchip_spin_gpu_irq(void)
|
||||
u32 i;
|
||||
void __iomem *gpurouting = (intc.base + LOCAL_GPU_ROUTING);
|
||||
u32 routing_val = readl(gpurouting);
|
||||
u32 irq_route;
|
||||
|
||||
/* Preserve FIQ routing bits */
|
||||
irq_route = routing_val & 0x3;
|
||||
routing_val &= ~0x3;
|
||||
|
||||
for (i = 1; i <= 3; i++) {
|
||||
u32 new_routing_val = (routing_val + i) & 3;
|
||||
irq_route = (irq_route + i) & 0x3;
|
||||
|
||||
if (cpu_active(new_routing_val)) {
|
||||
writel(new_routing_val, gpurouting);
|
||||
if (cpu_active(irq_route)) {
|
||||
writel(irq_route | routing_val, gpurouting);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user