FROMGIT: genirq: Retain depth for managed IRQs across CPU hotplug
Affinity-managed IRQs may be shut down and restarted during CPU
hotunplug/plug, and the IRQ may be left in an unexpected state.
Specifically:
1. IRQ affines to CPU N
2. disable_irq() -> depth is 1
3. CPU N goes offline
4. irq_shutdown() -> depth is set to 1 (again)
5. CPU N goes online
6. irq_startup() -> depth is set to 0 (BUG! client expected IRQ is
still disabled)
7. enable_irq() -> depth underflow / unbalanced enable_irq() WARN
It seems depth only needs preserved for managed IRQs + CPU hotplug, so
per Thomas's recommendation, we make that explicit.
I add kunit tests that cover some of this in a following patch.
Signed-off-by:
Brian Norris <briannorris@chromium.org>
Co-developed-by:
Thomas Gleixner <tglx@linutronix.de>
Signed-off-by:
Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250514201353.3481400-2-briannorris@chromium.org
Bug: 417330473
Change-Id: I9e19d182b0c16f353aa9068cac4eff8a64ffb21b
(cherry picked from commit 788019eb git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
)
Signed-off-by:
Bart Van Assche <bvanassche@google.com>
Loading
Please sign in to comment