-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Improved bcm2836/7 IRQ handling #6359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is exciting! I imagine this might help with the |
At this stage it's more likely to just permute the set of errors you get. There's no guaranteed maximum interrupt latency with this patch series. |
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]>
BCM2836 with Cortex-A7 cores has almost the same ARM_LOCAL interrupt routing logic as BCM2837, so relax the compile guard to CONFIG_SMP not CONFIG_ARM64. Signed-off-by: Jonathan Bell <[email protected]>
Also declare as static inline, as they should be. Signed-off-by: Jonathan Bell <[email protected]>
The ARM64 architecture uses qspinlock which has a fast and slow path. This isn't ideal for all claimers of a lock operating in interrupt context. Add a ticket-based lock similar to the armv6/7 implementation. Based on an upstream patch that was abandoned in favour of qspinlock. Link: https://patchwork.kernel.org/project/linux-arm-kernel/patch/[email protected]/ Signed-off-by: Jonathan Bell <[email protected]>
Warning on normal behaviour isn't sensible and is spammy. Demote to info. Signed-off-by: Jonathan Bell <[email protected]>
The local spinlock protects the handlers from racing against each other on separate cores, hard IRQs don't preempt each other, and disabling/enabling the interrupt is more expensive than letting the fake FIQ contend the spinlock. So turn local_fiq_en/disable into no-ops. Signed-off-by: Jonathan Bell <[email protected]>
Rebased on 6.12 and tested on a 3B+ (arm_64bit=1/0) and was functional in each case. |
First phase of preparing to add platform FIQ support for armv8. Catch some low-hanging fruit first.
Posting as a PR to get autobuilds for all affected platforms (Pi 0 through 3). Only merge if you're feeling brave...