aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/apic_32.c24
-rw-r--r--arch/x86/kernel/apic_64.c24
2 files changed, 43 insertions, 5 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}
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)
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);