GPU (i.e. not per core) interrupts on rpi2 can be routed to only one core which is selectable. It's core 0 after reset. The way how interrupts were dispatched before, a very same interrupt could be handled on more cores in parallel. In other words, only one core is permitted to dispatch GPU interrupts.
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/arm/broadcom/bcm2835/bcm2835_intr.c | ||
---|---|---|
166–167 | Won't this mean we don't get any interrupts not in bank 3 unless we happen to have a pending gpu interrupt? bcm2836_get_next_irq returns -1 if no bank 3 interrupts are pending, but there may be other interrupts. |
sys/arm/broadcom/bcm2835/bcm2835_intr.c | ||
---|---|---|
166–167 | According to manual I got - GPU interrupt can be high in one core only. My translation is that it can be high only on core to which all GPU interrupts are routed. We can select which core it will be, but the selection is for all GPU interrupts identical. And GPU interrupt on bank3 means that there is pending interrupt on bank0-2. Interrupts on these banks are not-per-core interrupts. If there is an interrupt on bank3, bcm2836_get_next_irq() returns its number. Only if there is no interrupt, -1 is returned. And only if there is BCM2836_GPU_IRQ interrupt, there is an interrupt pending on banks 0-2. An irg argument passed to bcm2836_get_next_irq() is not evaluated inside, so it's okay even in case that there are more GPU interrupts pending in banks 0-2. On the other hand, as bank3 is evaluated firstly and next interrupt can be only the one with higher number, the last_irq should be reset to -1 if it was from bank3. |
sys/arm/broadcom/bcm2835/bcm2835_intr.c | ||
---|---|---|
166–167 | Let me see if I understood this correctly, you are saying that when there is an interrupt in banks 0-2, BCM2836_GPU_IRQ will always be set in bank 3? |
sys/arm/broadcom/bcm2835/bcm2835_intr.c | ||
---|---|---|
166–167 | Yes, it's what I see and how it works on my rpi2. Futher, I can confirm that BCM2836_GPU_IRQ on bank3 is never high on core 1-3 when bank0-2 interrupts are routed to core 0. |
sys/arm/broadcom/bcm2835/bcm2835_intr.c | ||
---|---|---|
166–167 | Thanks! it makes sense now. |