diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/include/asm/apic.h | 3 | ||||
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/irq.c | 5 |
3 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 1a6c09af048..5fe0bd57475 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -410,6 +410,9 @@ extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); | |||
410 | #endif | 410 | #endif |
411 | 411 | ||
412 | #ifdef CONFIG_X86_LOCAL_APIC | 412 | #ifdef CONFIG_X86_LOCAL_APIC |
413 | |||
414 | DECLARE_PER_CPU(unsigned, icr_read_retry_count); | ||
415 | |||
413 | static inline u32 apic_read(u32 reg) | 416 | static inline u32 apic_read(u32 reg) |
414 | { | 417 | { |
415 | return apic->read(reg); | 418 | return apic->read(reg); |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index f98d84caf94..2942794a9a5 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -79,6 +79,11 @@ DEFINE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid, BAD_APICID); | |||
79 | EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid); | 79 | EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid); |
80 | EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid); | 80 | EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid); |
81 | 81 | ||
82 | /* | ||
83 | * ICR read retry counter | ||
84 | */ | ||
85 | DEFINE_PER_CPU(unsigned, icr_read_retry_count); | ||
86 | |||
82 | #ifdef CONFIG_X86_32 | 87 | #ifdef CONFIG_X86_32 |
83 | 88 | ||
84 | /* | 89 | /* |
@@ -250,6 +255,7 @@ u32 native_safe_apic_wait_icr_idle(void) | |||
250 | send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY; | 255 | send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY; |
251 | if (!send_status) | 256 | if (!send_status) |
252 | break; | 257 | break; |
258 | percpu_inc(icr_read_retry_count); | ||
253 | udelay(100); | 259 | udelay(100); |
254 | } while (timeout++ < 1000); | 260 | } while (timeout++ < 1000); |
255 | 261 | ||
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 429e0c92924..4bbf1627905 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -74,6 +74,10 @@ int arch_show_interrupts(struct seq_file *p, int prec) | |||
74 | for_each_online_cpu(j) | 74 | for_each_online_cpu(j) |
75 | seq_printf(p, "%10u ", irq_stats(j)->apic_irq_work_irqs); | 75 | seq_printf(p, "%10u ", irq_stats(j)->apic_irq_work_irqs); |
76 | seq_printf(p, " IRQ work interrupts\n"); | 76 | seq_printf(p, " IRQ work interrupts\n"); |
77 | seq_printf(p, "%*s: ", prec, "RTR"); | ||
78 | for_each_online_cpu(j) | ||
79 | seq_printf(p, "%10u ", per_cpu(icr_read_retry_count, j)); | ||
80 | seq_printf(p, " APIC ICR read retries\n"); | ||
77 | #endif | 81 | #endif |
78 | if (x86_platform_ipi_callback) { | 82 | if (x86_platform_ipi_callback) { |
79 | seq_printf(p, "%*s: ", prec, "PLT"); | 83 | seq_printf(p, "%*s: ", prec, "PLT"); |
@@ -136,6 +140,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
136 | sum += irq_stats(cpu)->irq_spurious_count; | 140 | sum += irq_stats(cpu)->irq_spurious_count; |
137 | sum += irq_stats(cpu)->apic_perf_irqs; | 141 | sum += irq_stats(cpu)->apic_perf_irqs; |
138 | sum += irq_stats(cpu)->apic_irq_work_irqs; | 142 | sum += irq_stats(cpu)->apic_irq_work_irqs; |
143 | sum += per_cpu(icr_read_retry_count, cpu); | ||
139 | #endif | 144 | #endif |
140 | if (x86_platform_ipi_callback) | 145 | if (x86_platform_ipi_callback) |
141 | sum += irq_stats(cpu)->x86_platform_ipis; | 146 | sum += irq_stats(cpu)->x86_platform_ipis; |