aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic/apic.c')
-rw-r--r--arch/x86/kernel/apic/apic.c41
1 files changed, 26 insertions, 15 deletions
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index fabf01eff77..ae147126b7b 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1812,30 +1812,41 @@ void smp_spurious_interrupt(struct pt_regs *regs)
1812 */ 1812 */
1813void smp_error_interrupt(struct pt_regs *regs) 1813void smp_error_interrupt(struct pt_regs *regs)
1814{ 1814{
1815 u32 v, v1; 1815 u32 v0, v1;
1816 u32 i = 0;
1817 static const char * const error_interrupt_reason[] = {
1818 "Send CS error", /* APIC Error Bit 0 */
1819 "Receive CS error", /* APIC Error Bit 1 */
1820 "Send accept error", /* APIC Error Bit 2 */
1821 "Receive accept error", /* APIC Error Bit 3 */
1822 "Redirectable IPI", /* APIC Error Bit 4 */
1823 "Send illegal vector", /* APIC Error Bit 5 */
1824 "Received illegal vector", /* APIC Error Bit 6 */
1825 "Illegal register address", /* APIC Error Bit 7 */
1826 };
1816 1827
1817 exit_idle(); 1828 exit_idle();
1818 irq_enter(); 1829 irq_enter();
1819 /* First tickle the hardware, only then report what went on. -- REW */ 1830 /* First tickle the hardware, only then report what went on. -- REW */
1820 v = apic_read(APIC_ESR); 1831 v0 = apic_read(APIC_ESR);
1821 apic_write(APIC_ESR, 0); 1832 apic_write(APIC_ESR, 0);
1822 v1 = apic_read(APIC_ESR); 1833 v1 = apic_read(APIC_ESR);
1823 ack_APIC_irq(); 1834 ack_APIC_irq();
1824 atomic_inc(&irq_err_count); 1835 atomic_inc(&irq_err_count);
1825 1836
1826 /* 1837 apic_printk(APIC_DEBUG, KERN_DEBUG "APIC error on CPU%d: %02x(%02x)",
1827 * Here is what the APIC error bits mean: 1838 smp_processor_id(), v0 , v1);
1828 * 0: Send CS error 1839
1829 * 1: Receive CS error 1840 v1 = v1 & 0xff;
1830 * 2: Send accept error 1841 while (v1) {
1831 * 3: Receive accept error 1842 if (v1 & 0x1)
1832 * 4: Reserved 1843 apic_printk(APIC_DEBUG, KERN_CONT " : %s", error_interrupt_reason[i]);
1833 * 5: Send illegal vector 1844 i++;
1834 * 6: Received illegal vector 1845 v1 >>= 1;
1835 * 7: Illegal register address 1846 };
1836 */ 1847
1837 pr_debug("APIC error on CPU%d: %02x(%02x)\n", 1848 apic_printk(APIC_DEBUG, KERN_CONT "\n");
1838 smp_processor_id(), v , v1); 1849
1839 irq_exit(); 1850 irq_exit();
1840} 1851}
1841 1852