Skip to content

Commit ec405ea

Browse files
author
Russell King
committed
ARM: include local timer irq stats only when local timers configured
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent e3fbb08 commit ec405ea

3 files changed

Lines changed: 16 additions & 12 deletions

File tree

‎arch/arm/include/asm/hardirq.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
typedef struct {
99
unsigned int __softirq_pending;
10+
#ifdef CONFIG_LOCAL_TIMERS
1011
unsigned int local_timer_irqs;
12+
#endif
1113
} ____cacheline_aligned irq_cpustat_t;
1214

1315
#include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */

‎arch/arm/kernel/irq.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ int show_interrupts(struct seq_file *p, void *v)
9393
#endif
9494
#ifdef CONFIG_SMP
9595
show_ipi_list(p);
96+
#endif
97+
#ifdef CONFIG_LOCAL_TIMERS
9698
show_local_irqs(p);
9799
#endif
98100
seq_printf(p, "Err: %10lu\n", irq_err_count);

‎arch/arm/kernel/smp.c‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -403,18 +403,6 @@ void show_ipi_list(struct seq_file *p)
403403
seq_putc(p, '\n');
404404
}
405405

406-
void show_local_irqs(struct seq_file *p)
407-
{
408-
unsigned int cpu;
409-
410-
seq_printf(p, "LOC: ");
411-
412-
for_each_present_cpu(cpu)
413-
seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
414-
415-
seq_putc(p, '\n');
416-
}
417-
418406
/*
419407
* Timer (local or broadcast) support
420408
*/
@@ -441,6 +429,18 @@ asmlinkage void __exception do_local_timer(struct pt_regs *regs)
441429

442430
set_irq_regs(old_regs);
443431
}
432+
433+
void show_local_irqs(struct seq_file *p)
434+
{
435+
unsigned int cpu;
436+
437+
seq_printf(p, "LOC: ");
438+
439+
for_each_present_cpu(cpu)
440+
seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
441+
442+
seq_putc(p, '\n');
443+
}
444444
#endif
445445

446446
#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST

0 commit comments

Comments
 (0)