summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-24 02:01:53 -0700
committerIngo Molnar <mingo@elte.hu>2008-10-16 16:53:03 +0200
commitdc1528dd864a0b79fa67b60b3ca5674fe94fdce5 (patch)
tree0cbdbaa7a32f626849fe2778a452d9d9d66c2366 /arch/x86/kernel/apic_64.c
parent773763df7de881e65ff2600c024c9ce2dde64750 (diff)
x86: apic unify smp_spurious/error_interrupt
Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index ebe417b4d7fc..c728885e4f4a 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -1528,10 +1528,17 @@ int __init APIC_init_uniprocessor(void)
/*
* This interrupt should _never_ happen with our APIC/SMP architecture
*/
+#ifdef CONFIG_X86_64
asmlinkage void smp_spurious_interrupt(void)
+#else
+void smp_spurious_interrupt(struct pt_regs *regs)
+#endif
{
- unsigned int v;
+ u32 v;
+
+#ifdef CONFIG_X86_64
exit_idle();
+#endif
irq_enter();
/*
* Check if this really is a spurious interrupt and ACK it
@@ -1542,18 +1549,31 @@ asmlinkage void smp_spurious_interrupt(void)
if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f)))
ack_APIC_irq();
+#ifdef CONFIG_X86_64
add_pda(irq_spurious_count, 1);
+#else
+ /* see sw-dev-man vol 3, chapter 7.4.13.5 */
+ printk(KERN_INFO "spurious APIC interrupt on CPU#%d, "
+ "should never happen.\n", smp_processor_id());
+ __get_cpu_var(irq_stat).irq_spurious_count++;
+#endif
irq_exit();
}
/*
* This interrupt should never happen with our APIC/SMP architecture
*/
+#ifdef CONFIG_X86_64
asmlinkage void smp_error_interrupt(void)
+#else
+void smp_error_interrupt(struct pt_regs *regs)
+#endif
{
- unsigned int v, v1;
+ u32 v, v1;
+#ifdef CONFIG_X86_64
exit_idle();
+#endif
irq_enter();
/* First tickle the hardware, only then report what went on. -- REW */
v = apic_read(APIC_ESR);