

- Fix printk bug in the diagnostic code.

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



 arch/i386/kernel/irq.c |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff -puN arch/i386/kernel/irq.c~irq-printing arch/i386/kernel/irq.c
--- 25/arch/i386/kernel/irq.c~irq-printing	2003-04-22 03:15:33.000000000 -0700
+++ 25-akpm/arch/i386/kernel/irq.c	2003-04-22 03:15:43.000000000 -0700
@@ -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
  * 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, s
 		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);
 		}
 	}
 

_
