aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_32.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_32.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_32.c')
-rw-r--r--arch/x86/kernel/apic_32.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index 0ec8321e687c..60a901b2d4fe 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -1474,10 +1474,17 @@ int __init APIC_init_uniprocessor(void)
1474/* 1474/*
1475 * This interrupt should _never_ happen with our APIC/SMP architecture 1475 * This interrupt should _never_ happen with our APIC/SMP architecture
1476 */ 1476 */
1477#ifdef CONFIG_X86_64
1478asmlinkage void smp_spurious_interrupt(void)
1479#else
1477void smp_spurious_interrupt(struct pt_regs *regs) 1480void smp_spurious_interrupt(struct pt_regs *regs)
1481#endif
1478{ 1482{
1479 unsigned long v; 1483 u32 v;
1480 1484
1485#ifdef CONFIG_X86_64
1486 exit_idle();
1487#endif
1481 irq_enter(); 1488 irq_enter();
1482 /* 1489 /*
1483 * Check if this really is a spurious interrupt and ACK it 1490 * Check if this really is a spurious interrupt and ACK it
@@ -1488,20 +1495,31 @@ void smp_spurious_interrupt(struct pt_regs *regs)
1488 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f))) 1495 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f)))
1489 ack_APIC_irq(); 1496 ack_APIC_irq();
1490 1497
1498#ifdef CONFIG_X86_64
1499 add_pda(irq_spurious_count, 1);
1500#else
1491 /* see sw-dev-man vol 3, chapter 7.4.13.5 */ 1501 /* see sw-dev-man vol 3, chapter 7.4.13.5 */
1492 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, " 1502 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, "
1493 "should never happen.\n", smp_processor_id()); 1503 "should never happen.\n", smp_processor_id());
1494 __get_cpu_var(irq_stat).irq_spurious_count++; 1504 __get_cpu_var(irq_stat).irq_spurious_count++;
1505#endif
1495 irq_exit(); 1506 irq_exit();
1496} 1507}
1497 1508
1498/* 1509/*
1499 * This interrupt should never happen with our APIC/SMP architecture 1510 * This interrupt should never happen with our APIC/SMP architecture
1500 */ 1511 */
1512#ifdef CONFIG_X86_64
1513asmlinkage void smp_error_interrupt(void)
1514#else
1501void smp_error_interrupt(struct pt_regs *regs) 1515void smp_error_interrupt(struct pt_regs *regs)
1516#endif
1502{ 1517{
1503 unsigned long v, v1; 1518 u32 v, v1;
1504 1519
1520#ifdef CONFIG_X86_64
1521 exit_idle();
1522#endif
1505 irq_enter(); 1523 irq_enter();
1506 /* First tickle the hardware, only then report what went on. -- REW */ 1524 /* First tickle the hardware, only then report what went on. -- REW */
1507 v = apic_read(APIC_ESR); 1525 v = apic_read(APIC_ESR);
@@ -1520,7 +1538,7 @@ void smp_error_interrupt(struct pt_regs *regs)
1520 6: Received illegal vector 1538 6: Received illegal vector
1521 7: Illegal register address 1539 7: Illegal register address
1522 */ 1540 */
1523 printk(KERN_DEBUG "APIC error on CPU%d: %02lx(%02lx)\n", 1541 printk(KERN_DEBUG "APIC error on CPU%d: %02x(%02x)\n",
1524 smp_processor_id(), v , v1); 1542 smp_processor_id(), v , v1);
1525 irq_exit(); 1543 irq_exit();
1526} 1544}