public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: warn on apic error
@ 2008-07-18 17:28 Vegard Nossum
  2008-07-18 17:44 ` Cyrill Gorcunov
  2008-07-18 19:02 ` Maciej W. Rozycki
  0 siblings, 2 replies; 10+ messages in thread
From: Vegard Nossum @ 2008-07-18 17:28 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Maciej W. Rozycki, linux-kernel

>From e89f2a9f33d01a2df7553b63cb1df525c6e75ad4 Mon Sep 17 00:00:00 2001
From: Vegard Nossum <vegard.nossum@gmail.com>
Date: Fri, 18 Jul 2008 19:14:06 +0200
Subject: [PATCH] x86: warn on apic error

There are certain APIC errors which are obviously programmer errors,
e.g. writing to illegal APIC registers, or sending invalid interrupt
vectors. Since the error interrupt happens spot on the erroneous code,
we might as well make a bit of noise about it and display the stack-
trace.

Cc: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
---
 arch/x86/kernel/apic_32.c |    1 +
 arch/x86/kernel/apic_64.c |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index a437d02..b9289cb 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -1317,6 +1317,7 @@ void smp_error_interrupt(struct pt_regs *regs)
 	*/
 	printk(KERN_DEBUG "APIC error on CPU%d: %02lx(%02lx)\n",
 		smp_processor_id(), v , v1);
+	WARN_ON(v1 & ((1 << 0) | (1 << 2) | (1 << 5) | (1 << 7)));
 	irq_exit();
 }
 
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index 1e3d32e..2d959f2 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -997,6 +997,7 @@ asmlinkage void smp_error_interrupt(void)
 	*/
 	printk(KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n",
 		smp_processor_id(), v , v1);
+	WARN_ON(v1 & ((1 << 0) | (1 << 2) | (1 << 5) | (1 << 7)));
 	irq_exit();
 }
 
-- 
1.5.5.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-07-20  6:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 17:28 [PATCH] x86: warn on apic error Vegard Nossum
2008-07-18 17:44 ` Cyrill Gorcunov
2008-07-18 17:45   ` Vegard Nossum
2008-07-18 17:49     ` Cyrill Gorcunov
2008-07-18 19:09       ` Maciej W. Rozycki
2008-07-18 19:13         ` Cyrill Gorcunov
2008-07-19 12:59         ` Cyrill Gorcunov
2008-07-19 23:08           ` Maciej W. Rozycki
2008-07-20  6:38             ` Cyrill Gorcunov
2008-07-18 19:02 ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox