Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277435
b: refs/heads/master
c: 346b46b
h: refs/heads/master
i:
  277433: f34361b
  277431: 89fe91a
v: v3
  • Loading branch information
Fernando Luis Vázquez Cao authored and Ingo Molnar committed Dec 14, 2011
1 parent 7ebc93f commit 1f2aca2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b95a7bd700466c10fda84acbd33f70cf66ec91ce
refs/heads/master: 346b46be5f10e4d247160ea94ac34450be60ce1e
3 changes: 3 additions & 0 deletions trunk/arch/x86/include/asm/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,9 @@ extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip);
#endif

#ifdef CONFIG_X86_LOCAL_APIC

DECLARE_PER_CPU(unsigned, icr_read_retry_count);

static inline u32 apic_read(u32 reg)
{
return apic->read(reg);
Expand Down
6 changes: 6 additions & 0 deletions trunk/arch/x86/kernel/apic/apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ DEFINE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid, BAD_APICID);
EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid);
EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);

/*
* ICR read retry counter
*/
DEFINE_PER_CPU(unsigned, icr_read_retry_count);

#ifdef CONFIG_X86_32

/*
Expand Down Expand Up @@ -250,6 +255,7 @@ u32 native_safe_apic_wait_icr_idle(void)
send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
if (!send_status)
break;
percpu_inc(icr_read_retry_count);
udelay(100);
} while (timeout++ < 1000);

Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/x86/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ int arch_show_interrupts(struct seq_file *p, int prec)
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->apic_irq_work_irqs);
seq_printf(p, " IRQ work interrupts\n");
seq_printf(p, "%*s: ", prec, "RTR");
for_each_online_cpu(j)
seq_printf(p, "%10u ", per_cpu(icr_read_retry_count, j));
seq_printf(p, " APIC ICR read retries\n");
#endif
if (x86_platform_ipi_callback) {
seq_printf(p, "%*s: ", prec, "PLT");
Expand Down Expand Up @@ -136,6 +140,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu)
sum += irq_stats(cpu)->irq_spurious_count;
sum += irq_stats(cpu)->apic_perf_irqs;
sum += irq_stats(cpu)->apic_irq_work_irqs;
sum += per_cpu(icr_read_retry_count, cpu);
#endif
if (x86_platform_ipi_callback)
sum += irq_stats(cpu)->x86_platform_ipis;
Expand Down

0 comments on commit 1f2aca2

Please sign in to comment.