aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-11-15 09:33:51 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-12-20 10:07:32 -0500
commitf13cd4170ee789f63b3c9585c1ae34e028bd549d (patch)
tree5304bd2cec241d635a13f3d588e80bbc17997d5b /arch/arm/kernel
parentcab8c6f3053c1b147bba825844c8e208f8b3b9f4 (diff)
ARM: fix /proc/interrupts formatting
As per x86, align the initial column according to how many IRQs we have. Also, provide an english explaination for the 'LOC:' and 'IPI:' lines. 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')
-rw-r--r--arch/arm/kernel/fiq.c5
-rw-r--r--arch/arm/kernel/irq.c16
-rw-r--r--arch/arm/kernel/smp.c14
3 files changed, 20 insertions, 15 deletions
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index 6ff7919613d7..47837b85c07c 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -67,10 +67,11 @@ static struct fiq_handler default_owner = {
67 67
68static struct fiq_handler *current_fiq = &default_owner; 68static struct fiq_handler *current_fiq = &default_owner;
69 69
70int show_fiq_list(struct seq_file *p, void *v) 70int show_fiq_list(struct seq_file *p, int prec)
71{ 71{
72 if (current_fiq != &default_owner) 72 if (current_fiq != &default_owner)
73 seq_printf(p, "FIQ: %s\n", current_fiq->name); 73 seq_printf(p, "%*s: %s\n", prec, "FIQ",
74 current_fiq->name);
74 75
75 return 0; 76 return 0;
76} 77}
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index ea29721ba348..4e7a7d272212 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -57,11 +57,15 @@ int show_interrupts(struct seq_file *p, void *v)
57 struct irq_desc *desc; 57 struct irq_desc *desc;
58 struct irqaction * action; 58 struct irqaction * action;
59 unsigned long flags; 59 unsigned long flags;
60 int prec, n;
61
62 for (prec = 3, n = 1000; prec < 10 && n <= nr_irqs; prec++)
63 n *= 10;
60 64
61 if (i == 0) { 65 if (i == 0) {
62 char cpuname[12]; 66 char cpuname[12];
63 67
64 seq_printf(p, " "); 68 seq_printf(p, "%*s ", prec, "");
65 for_each_present_cpu(cpu) { 69 for_each_present_cpu(cpu) {
66 sprintf(cpuname, "CPU%d", cpu); 70 sprintf(cpuname, "CPU%d", cpu);
67 seq_printf(p, " %10s", cpuname); 71 seq_printf(p, " %10s", cpuname);
@@ -76,7 +80,7 @@ int show_interrupts(struct seq_file *p, void *v)
76 if (!action) 80 if (!action)
77 goto unlock; 81 goto unlock;
78 82
79 seq_printf(p, "%3d: ", i); 83 seq_printf(p, "%*d: ", prec, i);
80 for_each_present_cpu(cpu) 84 for_each_present_cpu(cpu)
81 seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); 85 seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu));
82 seq_printf(p, " %10s", desc->chip->name ? : "-"); 86 seq_printf(p, " %10s", desc->chip->name ? : "-");
@@ -89,15 +93,15 @@ unlock:
89 raw_spin_unlock_irqrestore(&desc->lock, flags); 93 raw_spin_unlock_irqrestore(&desc->lock, flags);
90 } else if (i == nr_irqs) { 94 } else if (i == nr_irqs) {
91#ifdef CONFIG_FIQ 95#ifdef CONFIG_FIQ
92 show_fiq_list(p, v); 96 show_fiq_list(p, prec);
93#endif 97#endif
94#ifdef CONFIG_SMP 98#ifdef CONFIG_SMP
95 show_ipi_list(p); 99 show_ipi_list(p, prec);
96#endif 100#endif
97#ifdef CONFIG_LOCAL_TIMERS 101#ifdef CONFIG_LOCAL_TIMERS
98 show_local_irqs(p); 102 show_local_irqs(p, prec);
99#endif 103#endif
100 seq_printf(p, "Err: %10lu\n", irq_err_count); 104 seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
101 } 105 }
102 return 0; 106 return 0;
103} 107}
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 65b5ba867805..269237ed76a0 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -382,16 +382,16 @@ 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
385void show_ipi_list(struct seq_file *p) 385void show_ipi_list(struct seq_file *p, int prec)
386{ 386{
387 unsigned int cpu; 387 unsigned int cpu;
388 388
389 seq_puts(p, "IPI:"); 389 seq_printf(p, "%*s: ", prec, "IPI");
390 390
391 for_each_present_cpu(cpu) 391 for_each_present_cpu(cpu)
392 seq_printf(p, " %10u", __get_irq_stat(cpu, ipi_irqs)); 392 seq_printf(p, "%10u ", __get_irq_stat(cpu, ipi_irqs));
393 393
394 seq_putc(p, '\n'); 394 seq_printf(p, " Inter-processor interrupts\n");
395} 395}
396 396
397/* 397/*
@@ -421,16 +421,16 @@ asmlinkage void __exception do_local_timer(struct pt_regs *regs)
421 set_irq_regs(old_regs); 421 set_irq_regs(old_regs);
422} 422}
423 423
424void show_local_irqs(struct seq_file *p) 424void show_local_irqs(struct seq_file *p, int prec)
425{ 425{
426 unsigned int cpu; 426 unsigned int cpu;
427 427
428 seq_printf(p, "LOC: "); 428 seq_printf(p, "%*s: ", prec, "LOC");
429 429
430 for_each_present_cpu(cpu) 430 for_each_present_cpu(cpu)
431 seq_printf(p, "%10u ", __get_irq_stat(cpu, local_timer_irqs)); 431 seq_printf(p, "%10u ", __get_irq_stat(cpu, local_timer_irqs));
432 432
433 seq_putc(p, '\n'); 433 seq_printf(p, " Local timer interrupts\n");
434} 434}
435#endif 435#endif
436 436