Skip to content

Commit

Permalink
ARM: SMP: provide accessors for irq_stat data
Browse files Browse the repository at this point in the history
Provide __inc_irq_stat() and __get_irq_stat() to increment and
read the irq stat counters.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent ec405ea commit 46c48f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions arch/arm/include/asm/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ typedef struct {

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

#define __inc_irq_stat(cpu, member) __IRQ_STAT(cpu, member)++
#define __get_irq_stat(cpu, member) __IRQ_STAT(cpu, member)

#if NR_IRQS > 512
#define HARDIRQ_BITS 10
#elif NR_IRQS > 256
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ asmlinkage void __exception do_local_timer(struct pt_regs *regs)
int cpu = smp_processor_id();

if (local_timer_ack()) {
irq_stat[cpu].local_timer_irqs++;
__inc_irq_stat(cpu, local_timer_irqs);
ipi_timer();
}

Expand All @@ -437,7 +437,7 @@ void show_local_irqs(struct seq_file *p)
seq_printf(p, "LOC: ");

for_each_present_cpu(cpu)
seq_printf(p, "%10u ", irq_stat[cpu].local_timer_irqs);
seq_printf(p, "%10u ", __get_irq_stat(cpu, local_timer_irqs));

seq_putc(p, '\n');
}
Expand Down

0 comments on commit 46c48f2

Please sign in to comment.