Commit f1cd7ffc authored by Andrew Morton's avatar Andrew Morton Committed by Jeff Garzik

[PATCH] print IRQ handler addresses

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