aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-10-09 01:41:59 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-09 17:51:43 -0400
commitd3696cf7370583b272ff2f09524c9d37a83c71b2 (patch)
tree85678034e69eebebaccfb50130a864133ab357a3 /arch/x86_64/kernel
parent9b6d99f48dfc27d6009e134a5d771eaefd75faac (diff)
[PATCH] x86_64 irq: Scream but don't die if we receive an unexpected irq
Due to code bugs or misbehaving hardware it is possible that we can receive an interrupt that we have not mapped into a linux irq. Calling BUG when that happens is very rude, and if the problem is mild enough prevents anything else from getting done. So instead of calling BUG just scream loudly about the problem and continue running. We don't have enough knowledge to know which interrupt triggered this behavior so we don't acknowledge it. This will likely prevent a recurrence of the problem by jamming up the works with an unacknowledged interrupt. If the interrupt was something important it is quite possible that nothing productive will happen past this point. But it is now at least possible to keep working if the kernel can survive without the interrupt we dropped on the floor. Solutions like irqpoll should generally make dropped irqs non-fatal. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel')
-rw-r--r--arch/x86_64/kernel/irq.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index b8a407fcd5d5..dff68eb2b787 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -114,16 +114,16 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
114 irq_enter(); 114 irq_enter();
115 irq = __get_cpu_var(vector_irq)[vector]; 115 irq = __get_cpu_var(vector_irq)[vector];
116 116
117 if (unlikely(irq >= NR_IRQS)) {
118 printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
119 __FUNCTION__, irq);
120 BUG();
121 }
122
123#ifdef CONFIG_DEBUG_STACKOVERFLOW 117#ifdef CONFIG_DEBUG_STACKOVERFLOW
124 stack_overflow_check(regs); 118 stack_overflow_check(regs);
125#endif 119#endif
126 generic_handle_irq(irq); 120
121 if (likely(irq < NR_IRQS))
122 generic_handle_irq(irq);
123 else
124 printk(KERN_EMERG "%s: %d.%d No irq handler for vector\n",
125 __func__, smp_processor_id(), vector);
126
127 irq_exit(); 127 irq_exit();
128 128
129 set_irq_regs(old_regs); 129 set_irq_regs(old_regs);