aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic.c
diff options
context:
space:
mode:
authorHiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>2008-12-08 22:19:26 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-12 05:59:49 -0500
commit915b0d0104b72fd36af088ba4b11b5690bc96a6c (patch)
tree51b9ef993704c89dfd2c882eaa3f0aa6abff953b /arch/x86/kernel/apic.c
parentfd10902797fc9d6abaf55d9c2e3c6698c90b10c7 (diff)
x86: hardirq: introduce inc_irq_stat()
Impact: cleanup Introduce inc_irq_stat() macro and unify irq_stat accounting code. Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic.c')
-rw-r--r--arch/x86/kernel/apic.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/x86/kernel/apic.c b/arch/x86/kernel/apic.c
index 16f94879b525..1771dd746811 100644
--- a/arch/x86/kernel/apic.c
+++ b/arch/x86/kernel/apic.c
@@ -783,11 +783,7 @@ static void local_apic_timer_interrupt(void)
783 /* 783 /*
784 * the NMI deadlock-detector uses this. 784 * the NMI deadlock-detector uses this.
785 */ 785 */
786#ifdef CONFIG_X86_64 786 inc_irq_stat(apic_timer_irqs);
787 add_pda(apic_timer_irqs, 1);
788#else
789 per_cpu(irq_stat, cpu).apic_timer_irqs++;
790#endif
791 787
792 evt->event_handler(evt); 788 evt->event_handler(evt);
793} 789}
@@ -1695,14 +1691,11 @@ void smp_spurious_interrupt(struct pt_regs *regs)
1695 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f))) 1691 if (v & (1 << (SPURIOUS_APIC_VECTOR & 0x1f)))
1696 ack_APIC_irq(); 1692 ack_APIC_irq();
1697 1693
1698#ifdef CONFIG_X86_64 1694 inc_irq_stat(irq_spurious_count);
1699 add_pda(irq_spurious_count, 1); 1695
1700#else
1701 /* see sw-dev-man vol 3, chapter 7.4.13.5 */ 1696 /* see sw-dev-man vol 3, chapter 7.4.13.5 */
1702 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, " 1697 printk(KERN_INFO "spurious APIC interrupt on CPU#%d, "
1703 "should never happen.\n", smp_processor_id()); 1698 "should never happen.\n", smp_processor_id());
1704 __get_cpu_var(irq_stat).irq_spurious_count++;
1705#endif
1706 irq_exit(); 1699 irq_exit();
1707} 1700}
1708 1701