[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1294284532-24285-3-git-send-email-youquan.song@intel.com>
Date: Thu, 6 Jan 2011 11:28:52 +0800
From: Youquan Song <youquan.song@...el.com>
To: linux-kernel@...r.kernel.org, hpa@...ux.intel.com,
suresh.b.siddha@...el.com
Cc: arjan@...ux.intel.com, trenn@...e.de, kent.liu@...el.com,
chaohong.guo@...el.com,
Youquan Song <youquan.song@...ux.intel.com>,
Youquan Song <youquan.song@...el.com>
Subject: [PATCH 2/2] apic: Add print error interrupt reason
End user worry about the error interrupt information and intend to know what
kind of error interrupts are generated, so this patch add printing out the
detail debug information of error interrupt.
Signed-off-by: Youquan Song <youquan.song@...el.com>
---
arch/x86/kernel/apic/apic.c | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 3f838d5..f5538d5 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1794,6 +1794,31 @@ void smp_spurious_interrupt(struct pt_regs *regs)
irq_exit();
}
+static const char *error_interrupt_reason[] = {
+ "Send CS error",
+ "Receive CS error",
+ "Send accept error",
+ "Receive accept error",
+ "Redirectable IPI",
+ "Send illegal vector",
+ "Received illegal vector",
+ "Illegal register address",
+};
+
+static void print_error_interrupt_reason(u32 reason)
+{
+ u32 i = 0;
+ reason = reason & 0xff;
+ do {
+ if (reason & 0x1)
+ pr_debug(" : %s", error_interrupt_reason[i]);
+ i++;
+ reason >>= 1;
+ } while (reason > 0);
+
+ pr_debug("\n");
+}
+
/*
* This interrupt should never happen with our APIC/SMP architecture
*/
@@ -1821,8 +1846,9 @@ void smp_error_interrupt(struct pt_regs *regs)
* 6: Received illegal vector
* 7: Illegal register address
*/
- pr_debug("APIC error on CPU%d: %02x(%02x)\n",
+ pr_debug("APIC error on CPU%d: %02x(%02x)",
smp_processor_id(), v , v1);
+ print_error_interrupt_reason(v1);
irq_exit();
}
--
1.6.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists