aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-08-24 05:01:53 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-16 10:53:03 -0400
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 ebe417b4d7f..c728885e4f4 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)
1528/* 1528/*
1529 * This interrupt should _never_ happen with our APIC/SMP architecture 1529 * This interrupt should _never_ happen with our APIC/SMP architecture
1530 */ 1530 */
1531#ifdef CONFIG_X86_64
1531asmlinkage void smp_spurious_interrupt(void) 1532asmlinkage void smp_spurious_interrupt(void)
1533#else
1534void smp_spurious_interrupt(struct pt_regs *regs)
1535#endif
1532{ 1536{
1533 unsigned int v; 1537 u32 v;
1538
1539#ifdef CONFIG_X86_64
1534 exit_idle(); 1540 exit_idle();
1541#endif
1535 irq_enter(); 1542 irq_enter();
1536 /* 1543 /*
1537 * Check if this really is a spurious interrupt and ACK it 1544 * Check if this really is a spurious interrupt and ACK it
@@ -1542,18 +1549,31 @@ asmlinkage void smp_spurious_interrupt(void)
1542 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f))) 1549 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f)))
1543 ack_APIC_irq(); 1550 ack_APIC_irq();
1544 1551
1552#ifdef CONFIG_X86_64
1545 add_pda(irq_spurious_count, 1); 1553 add_pda(irq_spurious_count, 1);
1554#else
1555 /* see sw-dev-man vol 3, chapter 7.4.13.5 */
1556 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, "
1557 "should never happen.\n", smp_processor_id());
1558 __get_cpu_var(irq_stat).irq_spurious_count++;
1559#endif
1546 irq_exit(); 1560 irq_exit();
1547} 1561}
1548 1562
1549/* 1563/*
1550 * This interrupt should never happen with our APIC/SMP architecture 1564 * This interrupt should never happen with our APIC/SMP architecture
1551 */ 1565 */
1566#ifdef CONFIG_X86_64
1552asmlinkage void smp_error_interrupt(void) 1567asmlinkage void smp_error_interrupt(void)
1568#else
1569void smp_error_interrupt(struct pt_regs *regs)
1570#endif
1553{ 1571{
1554 unsigned int v, v1; 1572 u32 v, v1;
1555 1573
1574#ifdef CONFIG_X86_64
1556 exit_idle(); 1575 exit_idle();
1576#endif
1557 irq_enter(); 1577 irq_enter();
1558 /* First tickle the hardware, only then report what went on. -- REW */ 1578 /* First tickle the hardware, only then report what went on. -- REW */
1559 v = apic_read(APIC_ESR); 1579 v = apic_read(APIC_ESR);