diff options
author | Shanker Donthineni <sdonthineni@nvidia.com> | 2023-05-19 16:49:00 +0300 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2023-05-24 12:39:44 +0300 |
commit | bc06a9e0874239cb6d4eebcb0ecd1a91ad9272db (patch) | |
tree | 219f3876ab774118e3cad8937392d9e4f6a812ff /kernel/irq/chip.c | |
parent | d15121be7485655129101f3960ae6add40204463 (diff) | |
download | linux-bc06a9e0874239cb6d4eebcb0ecd1a91ad9272db.tar.xz |
genirq: Use hlist for managing resend handlers
The current implementation utilizes a bitmap for managing interrupt resend
handlers, which is allocated based on the SPARSE_IRQ/NR_IRQS macros.
However, this method may not efficiently utilize memory during runtime,
particularly when IRQ_BITMAP_BITS is large.
Address this issue by using an hlist to manage interrupt resend handlers
instead of relying on a static bitmap memory allocation. Additionally, a
new function, clear_irq_resend(), is introduced and called from
irq_shutdown to ensure a graceful teardown of the interrupt.
Signed-off-by: Shanker Donthineni <sdonthineni@nvidia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20230519134902.1495562-2-sdonthineni@nvidia.com
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 49e7bc871fec..2eac5532c3c8 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -306,6 +306,7 @@ static void __irq_disable(struct irq_desc *desc, bool mask); void irq_shutdown(struct irq_desc *desc) { if (irqd_is_started(&desc->irq_data)) { + clear_irq_resend(desc); desc->depth = 1; if (desc->irq_data.chip->irq_shutdown) { desc->irq_data.chip->irq_shutdown(&desc->irq_data); |