bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH gnumach] device/intr: Account for interrupts that could not be de


From: Damien Zammit
Subject: [PATCH gnumach] device/intr: Account for interrupts that could not be delivered
Date: Sat, 23 Nov 2024 22:20:32 +0000

When an irq handler dies, we are decrementing the n_unacked count
and calling __enable_irq() the right number of times, but we need
to decrement the total interrupt count by the number that were lost
and also clear that number.

This fixes a hang when a shared irq handler quits and leaves some
unacked interrupts.

---
 device/intr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/device/intr.c b/device/intr.c
index 9035c036..0d13acf7 100644
--- a/device/intr.c
+++ b/device/intr.c
@@ -307,6 +307,10 @@ intr_thread (void)
                e->n_unacked--;
              }
 
+             /* Account for all interrupts that could not be delivered */
+             irqtab.tot_num_intr -= e->interrupts;
+             e->interrupts = 0;
+
 #if 0
 #ifndef LINUX_DEV
              // TODO: remove from the action list
-- 
2.45.2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]