[PATCH] genirq: add handle_bad_irq()
authorIngo Molnar <mingo@elte.hu>
Thu, 29 Jun 2006 09:24:54 +0000 (02:24 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 29 Jun 2006 17:26:24 +0000 (10:26 -0700)
Handle bad IRQ vectors via the irqchip mechanism.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/irq/autoprobe.c
kernel/irq/handle.c

index cfdb63eb5c9450c288e7c76836e39cebf398d3b8..533068cfb607fad10202210b916909efd314cbb7 100644 (file)
@@ -11,6 +11,8 @@
 #include <linux/interrupt.h>
 #include <linux/delay.h>
 
+#include "internals.h"
+
 /*
  * Autodetection depends on the fact that any interrupt that
  * comes in on to an unassigned handler will get stuck with
@@ -41,6 +43,12 @@ unsigned long probe_irq_on(void)
 
                spin_lock_irq(&desc->lock);
                if (!desc->action && !(desc->status & IRQ_NOPROBE)) {
+                       /*
+                        * An old-style architecture might still have
+                        * the handle_bad_irq handler there:
+                        */
+                       compat_irq_chip_set_default_handler(desc);
+
                        /*
                         * Some chips need to know about probing in
                         * progress:
index a04b516afa59a593bf7aa8599a572c9e697c72dc..3a2dbcc9e215d21e8423180c57fd8e172f1735b9 100644 (file)
@@ -46,6 +46,7 @@ struct irq_desc irq_desc[NR_IRQS] __cacheline_aligned = {
        [0 ... NR_IRQS-1] = {
                .status = IRQ_DISABLED,
                .chip = &no_irq_type,
+               .handle_irq = handle_bad_irq,
                .depth = 1,
                .lock = SPIN_LOCK_UNLOCKED,
 #ifdef CONFIG_SMP