]> git.hungrycats.org Git - linux/commitdiff
[PATCH] print IRQ handler addresses
authorAndrew Morton <akpm@digeo.com>
Wed, 23 Apr 2003 11:32:42 +0000 (04:32 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 23 Apr 2003 11:32:42 +0000 (04:32 -0700)
- Fix printk bug in the diagnostic code.

- If an error occurs, print the address of all the offending action
  handlers.  Also the symbol name if CONFIG_KALLSYMS.

arch/i386/kernel/irq.c

index d9719e0e0141673f4e36c2e146e6cdbe4d0b0413..817a226288dabdab639bc7ed6bd2ee99aaf16569 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <linux/kallsyms.h>
 
 #include <asm/atomic.h>
 #include <asm/io.h>
@@ -203,10 +204,12 @@ inline void synchronize_irq(unsigned int irq)
  * waste of time and is not what some drivers would
  * prefer.
  */
-int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
+int handle_IRQ_event(unsigned int irq,
+               struct pt_regs *regs, struct irqaction *action)
 {
        int status = 1; /* Force the "do bottom halves" bit */
        int retval = 0;
+       struct irqaction *first_action = action;
 
        if (!(action->flags & SA_INTERRUPT))
                local_irq_enable();
@@ -223,12 +226,22 @@ int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction *
                static int count = 100;
                if (count) {
                        count--;
-                       printk(retval
-                               ? "irq event %d: bogus retval mask %x\n"
-                               : "irq %d: nobody cared!\n",
-                               irq, 
-                               retval);
+                       if (retval) {
+                               printk("irq event %d: bogus retval mask %x\n",
+                                       irq, retval);
+                       } else {
+                               printk("irq %d: nobody cared!\n", irq);
+                       }
                        dump_stack();
+                       printk("handlers:\n");
+                       action = first_action;
+                       do {
+                               printk("[<%p>]", action->handler);
+                               print_symbol(" (%s)",
+                                       (unsigned long)action->handler);
+                               printk("\n");
+                               action = action->next;
+                       } while (action);
                }
        }