aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/spurious.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-16 17:43:50 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-16 17:46:49 +0100
commit74296a8ed6aa3c5bf672808ada690de7ba323ecc (patch)
treebaf9aa0f86e27d33dff0c4d0e33774fe80c908bc /kernel/irq/spurious.c
parent5a2dd72abdae75ea2960145e0549635ce4e0be96 (diff)
downloadkernel_samsung_crespo-74296a8ed6aa3c5bf672808ada690de7ba323ecc.zip
kernel_samsung_crespo-74296a8ed6aa3c5bf672808ada690de7ba323ecc.tar.gz
kernel_samsung_crespo-74296a8ed6aa3c5bf672808ada690de7ba323ecc.tar.bz2
irq: provide debug_poll_all_shared_irqs() method under CONFIG_DEBUG_SHIRQ
Provide a shared interrupt debug facility under CONFIG_DEBUG_SHIRQ: it uses the existing irqpoll facilities to iterate through all registered interrupt handlers and call those which can handle shared IRQ lines. This can be handy for suspend/resume debugging: if we call this function early during resume we can trigger crashes in those drivers which have incorrect assumptions about when exactly their ISRs will be called during suspend/resume. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/spurious.c')
-rw-r--r--kernel/irq/spurious.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index dd364c1..4d56829 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -104,7 +104,7 @@ static int misrouted_irq(int irq)
return ok;
}
-static void poll_spurious_irqs(unsigned long dummy)
+static void poll_all_shared_irqs(void)
{
struct irq_desc *desc;
int i;
@@ -123,11 +123,23 @@ static void poll_spurious_irqs(unsigned long dummy)
try_one_irq(i, desc);
}
+}
+
+static void poll_spurious_irqs(unsigned long dummy)
+{
+ poll_all_shared_irqs();
mod_timer(&poll_spurious_irq_timer,
jiffies + POLL_SPURIOUS_IRQ_INTERVAL);
}
+#ifdef CONFIG_DEBUG_SHIRQ
+void debug_poll_all_shared_irqs(void)
+{
+ poll_all_shared_irqs();
+}
+#endif
+
/*
* If 99,900 of the previous 100,000 interrupts have not been handled
* then assume that the IRQ is stuck in some manner. Drop a diagnostic