diff options
Diffstat (limited to 'arch/x86/kernel/irq.c')
-rw-r--r-- | arch/x86/kernel/irq.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index c3fe010d74c8..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 | ||
16 | atomic_t irq_err_count; | 17 | atomic_t irq_err_count; |
17 | 18 | ||
@@ -24,9 +25,9 @@ void (*generic_interrupt_extension)(void) = NULL; | |||
24 | */ | 25 | */ |
25 | void ack_bad_irq(unsigned int irq) | 26 | void 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)) |
@@ -63,6 +62,14 @@ static int show_other_interrupts(struct seq_file *p, int prec) | |||
63 | for_each_online_cpu(j) | 62 | for_each_online_cpu(j) |
64 | seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count); | 63 | seq_printf(p, "%10u ", irq_stats(j)->irq_spurious_count); |
65 | seq_printf(p, " Spurious interrupts\n"); | 64 | seq_printf(p, " Spurious interrupts\n"); |
65 | seq_printf(p, "%*s: ", prec, "CNT"); | ||
66 | for_each_online_cpu(j) | ||
67 | seq_printf(p, "%10u ", irq_stats(j)->apic_perf_irqs); | ||
68 | seq_printf(p, " Performance counter interrupts\n"); | ||
69 | seq_printf(p, "%*s: ", prec, "PND"); | ||
70 | for_each_online_cpu(j) | ||
71 | seq_printf(p, "%10u ", irq_stats(j)->apic_pending_irqs); | ||
72 | seq_printf(p, " Performance pending work\n"); | ||
66 | #endif | 73 | #endif |
67 | if (generic_interrupt_extension) { | 74 | if (generic_interrupt_extension) { |
68 | seq_printf(p, "%*s: ", prec, "PLT"); | 75 | seq_printf(p, "%*s: ", prec, "PLT"); |
@@ -166,6 +173,8 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
166 | #ifdef CONFIG_X86_LOCAL_APIC | 173 | #ifdef CONFIG_X86_LOCAL_APIC |
167 | sum += irq_stats(cpu)->apic_timer_irqs; | 174 | sum += irq_stats(cpu)->apic_timer_irqs; |
168 | sum += irq_stats(cpu)->irq_spurious_count; | 175 | sum += irq_stats(cpu)->irq_spurious_count; |
176 | sum += irq_stats(cpu)->apic_perf_irqs; | ||
177 | sum += irq_stats(cpu)->apic_pending_irqs; | ||
169 | #endif | 178 | #endif |
170 | if (generic_interrupt_extension) | 179 | if (generic_interrupt_extension) |
171 | sum += irq_stats(cpu)->generic_irqs; | 180 | sum += irq_stats(cpu)->generic_irqs; |
@@ -178,7 +187,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
178 | sum += irq_stats(cpu)->irq_thermal_count; | 187 | sum += irq_stats(cpu)->irq_thermal_count; |
179 | # ifdef CONFIG_X86_64 | 188 | # ifdef CONFIG_X86_64 |
180 | sum += irq_stats(cpu)->irq_threshold_count; | 189 | sum += irq_stats(cpu)->irq_threshold_count; |
181 | #endif | 190 | # endif |
182 | #endif | 191 | #endif |
183 | return sum; | 192 | return sum; |
184 | } | 193 | } |
@@ -213,14 +222,11 @@ unsigned int __irq_entry do_IRQ(struct pt_regs *regs) | |||
213 | irq = __get_cpu_var(vector_irq)[vector]; | 222 | irq = __get_cpu_var(vector_irq)[vector]; |
214 | 223 | ||
215 | if (!handle_irq(irq, regs)) { | 224 | if (!handle_irq(irq, regs)) { |
216 | #ifdef CONFIG_X86_64 | 225 | ack_APIC_irq(); |
217 | if (!disable_apic) | ||
218 | ack_APIC_irq(); | ||
219 | #endif | ||
220 | 226 | ||
221 | if (printk_ratelimit()) | 227 | if (printk_ratelimit()) |
222 | 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", |
223 | __func__, smp_processor_id(), vector, irq); | 229 | __func__, smp_processor_id(), vector, irq); |
224 | } | 230 | } |
225 | 231 | ||
226 | irq_exit(); | 232 | irq_exit(); |