aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/irq.c')
-rw-r--r--arch/x86/kernel/irq.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 8279fb8df17f..38287b5f116e 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -12,6 +12,7 @@
12#include <asm/io_apic.h> 12#include <asm/io_apic.h>
13#include <asm/irq.h> 13#include <asm/irq.h>
14#include <asm/idle.h> 14#include <asm/idle.h>
15#include <asm/hw_irq.h>
15 16
16atomic_t irq_err_count; 17atomic_t irq_err_count;
17 18
@@ -24,9 +25,9 @@ void (*generic_interrupt_extension)(void) = NULL;
24 */ 25 */
25void ack_bad_irq(unsigned int irq) 26void ack_bad_irq(unsigned int irq)
26{ 27{
27 printk(KERN_ERR "unexpected IRQ trap at vector %02x\n", irq); 28 if (printk_ratelimit())
29 pr_err("unexpected IRQ trap at vector %02x\n", irq);
28 30
29#ifdef CONFIG_X86_LOCAL_APIC
30 /* 31 /*
31 * Currently unexpected vectors happen only on SMP and APIC. 32 * Currently unexpected vectors happen only on SMP and APIC.
32 * We _must_ ack these because every local APIC has only N 33 * We _must_ ack these because every local APIC has only N
@@ -36,9 +37,7 @@ void ack_bad_irq(unsigned int irq)
36 * completely. 37 * completely.
37 * But only ack when the APIC is enabled -AK 38 * But only ack when the APIC is enabled -AK
38 */ 39 */
39 if (cpu_has_apic) 40 ack_APIC_irq();
40 ack_APIC_irq();
41#endif
42} 41}
43 42
44#define irq_stats(x) (&per_cpu(irq_stat, x)) 43#define irq_stats(x) (&per_cpu(irq_stat, x))
@@ -188,7 +187,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
188 sum += irq_stats(cpu)->irq_thermal_count; 187 sum += irq_stats(cpu)->irq_thermal_count;
189# ifdef CONFIG_X86_64 188# ifdef CONFIG_X86_64
190 sum += irq_stats(cpu)->irq_threshold_count; 189 sum += irq_stats(cpu)->irq_threshold_count;
191#endif 190# endif
192#endif 191#endif
193 return sum; 192 return sum;
194} 193}
@@ -223,14 +222,11 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
223 irq = __get_cpu_var(vector_irq)[vector]; 222 irq = __get_cpu_var(vector_irq)[vector];
224 223
225 if (!handle_irq(irq, regs)) { 224 if (!handle_irq(irq, regs)) {
226#ifdef CONFIG_X86_64 225 ack_APIC_irq();
227 if (!disable_apic)
228 ack_APIC_irq();
229#endif
230 226
231 if (printk_ratelimit()) 227 if (printk_ratelimit())
232 printk(KERN_EMERG "%s: %d.%d No irq handler for vector (irq %d)\n", 228 pr_emerg("%s: %d.%d No irq handler for vector (irq %d)\n",
233 __func__, smp_processor_id(), vector, irq); 229 __func__, smp_processor_id(), vector, irq);
234 } 230 }
235 231
236 irq_exit(); 232 irq_exit();