ARM: include local timer irq stats only when local timers configured
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 15 Nov 2010 13:38:06 +0000 (13:38 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 20 Dec 2010 15:06:57 +0000 (15:06 +0000)
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/hardirq.h
arch/arm/kernel/irq.c
arch/arm/kernel/smp.c

index 6d7485aff9558dcfba7de1f1cfb4a648778a6c6b..522fb23241acce56c25d83c48681adeaeadd09ad 100644 (file)
@@ -7,7 +7,9 @@
 
 typedef struct {
        unsigned int __softirq_pending;
+#ifdef CONFIG_LOCAL_TIMERS
        unsigned int local_timer_irqs;
+#endif
 } ____cacheline_aligned irq_cpustat_t;
 
 #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */
index 36ad3be4692a21c4970de80b8d8562327571f681..ea29721ba3483bc95de925cc3f79ceefb37e6baa 100644 (file)
@@ -93,6 +93,8 @@ unlock:
 #endif
 #ifdef CONFIG_SMP
                show_ipi_list(p);
+#endif
+#ifdef CONFIG_LOCAL_TIMERS
                show_local_irqs(p);
 #endif
                seq_printf(p, "Err: %10lu\n", irq_err_count);
index 3772cfc6953a011147ef8ef3b9fbdf224e894c39..36d4b9140dcf13cea071715e8c73b55d80a6522d 100644 (file)
@@ -403,18 +403,6 @@ void show_ipi_list(struct seq_file *p)
        seq_putc(p, '\n');
 }
 
-void show_local_irqs(struct seq_file *p)
-{
-       unsigned int cpu;
-
-       seq_printf(p, "LOC: ");
-
-       for_each_present_cpu(cpu)
-               seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
-
-       seq_putc(p, '\n');
-}
-
 /*
  * Timer (local or broadcast) support
  */
@@ -441,6 +429,18 @@ asmlinkage void __exception do_local_timer(struct pt_regs *regs)
 
        set_irq_regs(old_regs);
 }
+
+void show_local_irqs(struct seq_file *p)
+{
+       unsigned int cpu;
+
+       seq_printf(p, "LOC: ");
+
+       for_each_present_cpu(cpu)
+               seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
+
+       seq_putc(p, '\n');
+}
 #endif
 
 #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST