diff options
author | Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp> | 2011-12-14 21:32:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-18 04:46:48 -0500 |
commit | b49d7d877ff96428c8cd2076b33ba72bf85ceaba (patch) | |
tree | 7c0a4983a44bb70710e1efb501f0dcf21266f554 | |
parent | 346b46be5f10e4d247160ea94ac34450be60ce1e (diff) |
x86: Convert per-cpu counter icr_read_retry_count into a member of irq_stat
LAPIC related statistics are grouped inside the per-cpu
structure irq_stat, so there is no need for icr_read_retry_count
to be a standalone per-cpu variable.
This patch moves icr_read_retry_count to where it belongs.
Suggested-y: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Fernando Luis Vazquez Cao <fernando@oss.ntt.co.jp>
Cc: Jörn Engel <joern@logfs.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/include/asm/apic.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/hardirq.h | 1 | ||||
-rw-r--r-- | arch/x86/kernel/apic/apic.c | 7 | ||||
-rw-r--r-- | arch/x86/kernel/irq.c | 4 |
4 files changed, 4 insertions, 10 deletions
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 5fe0bd574756..a0f541a30944 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h | |||
@@ -411,8 +411,6 @@ extern int wakeup_secondary_cpu_via_nmi(int apicid, unsigned long start_eip); | |||
411 | 411 | ||
412 | #ifdef CONFIG_X86_LOCAL_APIC | 412 | #ifdef CONFIG_X86_LOCAL_APIC |
413 | 413 | ||
414 | DECLARE_PER_CPU(unsigned, icr_read_retry_count); | ||
415 | |||
416 | static inline u32 apic_read(u32 reg) | 414 | static inline u32 apic_read(u32 reg) |
417 | { | 415 | { |
418 | return apic->read(reg); | 416 | return apic->read(reg); |
diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h index 55e4de613f0e..da0b3ca815b7 100644 --- a/arch/x86/include/asm/hardirq.h +++ b/arch/x86/include/asm/hardirq.h | |||
@@ -11,6 +11,7 @@ typedef struct { | |||
11 | #ifdef CONFIG_X86_LOCAL_APIC | 11 | #ifdef CONFIG_X86_LOCAL_APIC |
12 | unsigned int apic_timer_irqs; /* arch dependent */ | 12 | unsigned int apic_timer_irqs; /* arch dependent */ |
13 | unsigned int irq_spurious_count; | 13 | unsigned int irq_spurious_count; |
14 | unsigned int icr_read_retry_count; | ||
14 | #endif | 15 | #endif |
15 | unsigned int x86_platform_ipis; /* arch dependent */ | 16 | unsigned int x86_platform_ipis; /* arch dependent */ |
16 | unsigned int apic_perf_irqs; | 17 | unsigned int apic_perf_irqs; |
diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index 2942794a9a52..07832363b729 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c | |||
@@ -79,11 +79,6 @@ 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 | |||
87 | #ifdef CONFIG_X86_32 | 82 | #ifdef CONFIG_X86_32 |
88 | 83 | ||
89 | /* | 84 | /* |
@@ -255,7 +250,7 @@ u32 native_safe_apic_wait_icr_idle(void) | |||
255 | send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY; | 250 | send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY; |
256 | if (!send_status) | 251 | if (!send_status) |
257 | break; | 252 | break; |
258 | percpu_inc(icr_read_retry_count); | 253 | inc_irq_stat(icr_read_retry_count); |
259 | udelay(100); | 254 | udelay(100); |
260 | } while (timeout++ < 1000); | 255 | } while (timeout++ < 1000); |
261 | 256 | ||
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 4bbf1627905b..ef54ed4e307d 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c | |||
@@ -76,7 +76,7 @@ int arch_show_interrupts(struct seq_file *p, int prec) | |||
76 | seq_printf(p, " IRQ work interrupts\n"); | 76 | seq_printf(p, " IRQ work interrupts\n"); |
77 | seq_printf(p, "%*s: ", prec, "RTR"); | 77 | seq_printf(p, "%*s: ", prec, "RTR"); |
78 | for_each_online_cpu(j) | 78 | for_each_online_cpu(j) |
79 | seq_printf(p, "%10u ", per_cpu(icr_read_retry_count, j)); | 79 | seq_printf(p, "%10u ", irq_stats(j)->icr_read_retry_count); |
80 | seq_printf(p, " APIC ICR read retries\n"); | 80 | seq_printf(p, " APIC ICR read retries\n"); |
81 | #endif | 81 | #endif |
82 | if (x86_platform_ipi_callback) { | 82 | if (x86_platform_ipi_callback) { |
@@ -140,7 +140,7 @@ u64 arch_irq_stat_cpu(unsigned int cpu) | |||
140 | sum += irq_stats(cpu)->irq_spurious_count; | 140 | sum += irq_stats(cpu)->irq_spurious_count; |
141 | sum += irq_stats(cpu)->apic_perf_irqs; | 141 | sum += irq_stats(cpu)->apic_perf_irqs; |
142 | 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); | 143 | sum += irq_stats(cpu)->icr_read_retry_count; |
144 | #endif | 144 | #endif |
145 | if (x86_platform_ipi_callback) | 145 | if (x86_platform_ipi_callback) |
146 | sum += irq_stats(cpu)->x86_platform_ipis; | 146 | sum += irq_stats(cpu)->x86_platform_ipis; |