diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-11-15 09:40:29 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-20 10:08:01 -0500 |
commit | 4a88abd7b48e8ec8084b1252d0f5ebdab43c2508 (patch) | |
tree | 6f2bd56428c4a684c1bd4a06767e78128977c492 /arch/arm/kernel/smp.c | |
parent | f13cd4170ee789f63b3c9585c1ae34e028bd549d (diff) |
ARM: SMP: provide individual IPI interrupt statistics
This separates out the individual IPI interrupt counts from the
total IPI count, which allows better visibility of what IPIs are
being used for.
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/smp.c')
-rw-r--r-- | arch/arm/kernel/smp.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 269237ed76a0..fa0c5f6e1587 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -382,16 +382,28 @@ void arch_send_call_function_single_ipi(int cpu) | |||
382 | smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); | 382 | smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE); |
383 | } | 383 | } |
384 | 384 | ||
385 | static const char *ipi_types[NR_IPI] = { | ||
386 | #define S(x,s) [x - IPI_TIMER] = s | ||
387 | S(IPI_TIMER, "Timer broadcast interrupts"), | ||
388 | S(IPI_RESCHEDULE, "Rescheduling interrupts"), | ||
389 | S(IPI_CALL_FUNC, "Function call interrupts"), | ||
390 | S(IPI_CALL_FUNC_SINGLE, "Single function call interrupts"), | ||
391 | S(IPI_CPU_STOP, "CPU stop interrupts"), | ||
392 | }; | ||
393 | |||
385 | void show_ipi_list(struct seq_file *p, int prec) | 394 | void show_ipi_list(struct seq_file *p, int prec) |
386 | { | 395 | { |
387 | unsigned int cpu; | 396 | unsigned int cpu, i; |
388 | 397 | ||
389 | seq_printf(p, "%*s: ", prec, "IPI"); | 398 | for (i = 0; i < NR_IPI; i++) { |
399 | seq_printf(p, "%*s%u: ", prec - 1, "IPI", i); | ||
390 | 400 | ||
391 | for_each_present_cpu(cpu) | 401 | for_each_present_cpu(cpu) |
392 | seq_printf(p, "%10u ", __get_irq_stat(cpu, ipi_irqs)); | 402 | seq_printf(p, "%10u ", |
403 | __get_irq_stat(cpu, ipi_irqs[i])); | ||
393 | 404 | ||
394 | seq_printf(p, " Inter-processor interrupts\n"); | 405 | seq_printf(p, " %s\n", ipi_types[i]); |
406 | } | ||
395 | } | 407 | } |
396 | 408 | ||
397 | /* | 409 | /* |
@@ -506,7 +518,8 @@ asmlinkage void __exception do_IPI(int ipinr, struct pt_regs *regs) | |||
506 | unsigned int cpu = smp_processor_id(); | 518 | unsigned int cpu = smp_processor_id(); |
507 | struct pt_regs *old_regs = set_irq_regs(regs); | 519 | struct pt_regs *old_regs = set_irq_regs(regs); |
508 | 520 | ||
509 | __inc_irq_stat(cpu, ipi_irqs); | 521 | if (ipinr >= IPI_TIMER && ipinr < IPI_TIMER + NR_IPI) |
522 | __inc_irq_stat(cpu, ipi_irqs[ipinr - IPI_TIMER]); | ||
510 | 523 | ||
511 | switch (ipinr) { | 524 | switch (ipinr) { |
512 | case IPI_TIMER: | 525 | case IPI_TIMER: |