Commit 74296a8e authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarIngo Molnar <mingo@elte.hu>
parent 5a2dd72a
...@@ -462,6 +462,12 @@ static inline void init_irq_proc(void) ...@@ -462,6 +462,12 @@ static inline void init_irq_proc(void)
} }
#endif #endif
#if defined(CONFIG_GENERIC_HARDIRQS) && defined(CONFIG_DEBUG_SHIRQ)
extern void debug_poll_all_shared_irqs(void);
#else
static inline void debug_poll_all_shared_irqs(void) { }
#endif
int show_interrupts(struct seq_file *p, void *v); int show_interrupts(struct seq_file *p, void *v);
struct irq_desc; struct irq_desc;
......
...@@ -104,7 +104,7 @@ static int misrouted_irq(int irq) ...@@ -104,7 +104,7 @@ static int misrouted_irq(int irq)
return ok; return ok;
} }
static void poll_spurious_irqs(unsigned long dummy) static void poll_all_shared_irqs(void)
{ {
struct irq_desc *desc; struct irq_desc *desc;
int i; int i;
...@@ -123,11 +123,23 @@ static void poll_spurious_irqs(unsigned long dummy) ...@@ -123,11 +123,23 @@ static void poll_spurious_irqs(unsigned long dummy)
try_one_irq(i, desc); try_one_irq(i, desc);
} }
}
static void poll_spurious_irqs(unsigned long dummy)
{
poll_all_shared_irqs();
mod_timer(&poll_spurious_irq_timer, mod_timer(&poll_spurious_irq_timer,
jiffies + POLL_SPURIOUS_IRQ_INTERVAL); 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 * 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 * then assume that the IRQ is stuck in some manner. Drop a diagnostic
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment