Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 225874
b: refs/heads/master
c: 4a88abd
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Dec 20, 2010
1 parent 807b2ff commit 26b6058
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f13cd4170ee789f63b3c9585c1ae34e028bd549d
refs/heads/master: 4a88abd7b48e8ec8084b1252d0f5ebdab43c2508
4 changes: 3 additions & 1 deletion trunk/arch/arm/include/asm/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#include <linux/threads.h>
#include <asm/irq.h>

#define NR_IPI 5

typedef struct {
unsigned int __softirq_pending;
#ifdef CONFIG_LOCAL_TIMERS
unsigned int local_timer_irqs;
#endif
#ifdef CONFIG_SMP
unsigned int ipi_irqs;
unsigned int ipi_irqs[NR_IPI];
#endif
} ____cacheline_aligned irq_cpustat_t;

Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ int show_interrupts(struct seq_file *p, void *v)
for (prec = 3, n = 1000; prec < 10 && n <= nr_irqs; prec++)
n *= 10;

#ifdef CONFIG_SMP
if (prec < 4)
prec = 4;
#endif

if (i == 0) {
char cpuname[12];

Expand Down
25 changes: 19 additions & 6 deletions trunk/arch/arm/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,16 +382,28 @@ void arch_send_call_function_single_ipi(int cpu)
smp_cross_call(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
}

static const char *ipi_types[NR_IPI] = {
#define S(x,s) [x - IPI_TIMER] = s
S(IPI_TIMER, "Timer broadcast interrupts"),
S(IPI_RESCHEDULE, "Rescheduling interrupts"),
S(IPI_CALL_FUNC, "Function call interrupts"),
S(IPI_CALL_FUNC_SINGLE, "Single function call interrupts"),
S(IPI_CPU_STOP, "CPU stop interrupts"),
};

void show_ipi_list(struct seq_file *p, int prec)
{
unsigned int cpu;
unsigned int cpu, i;

seq_printf(p, "%*s: ", prec, "IPI");
for (i = 0; i < NR_IPI; i++) {
seq_printf(p, "%*s%u: ", prec - 1, "IPI", i);

for_each_present_cpu(cpu)
seq_printf(p, "%10u ", __get_irq_stat(cpu, ipi_irqs));
for_each_present_cpu(cpu)
seq_printf(p, "%10u ",
__get_irq_stat(cpu, ipi_irqs[i]));

seq_printf(p, " Inter-processor interrupts\n");
seq_printf(p, " %s\n", ipi_types[i]);
}
}

/*
Expand Down Expand Up @@ -506,7 +518,8 @@ asmlinkage void __exception do_IPI(int ipinr, struct pt_regs *regs)
unsigned int cpu = smp_processor_id();
struct pt_regs *old_regs = set_irq_regs(regs);

__inc_irq_stat(cpu, ipi_irqs);
if (ipinr >= IPI_TIMER && ipinr < IPI_TIMER + NR_IPI)
__inc_irq_stat(cpu, ipi_irqs[ipinr - IPI_TIMER]);

switch (ipinr) {
case IPI_TIMER:
Expand Down

0 comments on commit 26b6058

Please sign in to comment.