diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:31:35 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:32:03 -0500 |
commit | 4ec3eb13634529c0bc7466658d84d0bbe3244aea (patch) | |
tree | b491daac2ccfc7b8ca88e171a43f66888463568a /arch/arm/kernel/irq.c | |
parent | 24056f525051a9e186af28904b396320e18bf9a0 (diff) | |
parent | 15095bb0fe779c0403091bda7adce5fb3bb9ca35 (diff) |
Merge branch 'smp' into misc
Conflicts:
arch/arm/kernel/entry-armv.S
arch/arm/mm/ioremap.c
Diffstat (limited to 'arch/arm/kernel/irq.c')
-rw-r--r-- | arch/arm/kernel/irq.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index a591971dbf7b..c1269944cc59 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -56,11 +56,20 @@ int show_interrupts(struct seq_file *p, void *v) | |||
56 | struct irq_desc *desc; | 56 | struct irq_desc *desc; |
57 | struct irqaction * action; | 57 | struct irqaction * action; |
58 | unsigned long flags; | 58 | unsigned long flags; |
59 | int prec, n; | ||
60 | |||
61 | for (prec = 3, n = 1000; prec < 10 && n <= nr_irqs; prec++) | ||
62 | n *= 10; | ||
63 | |||
64 | #ifdef CONFIG_SMP | ||
65 | if (prec < 4) | ||
66 | prec = 4; | ||
67 | #endif | ||
59 | 68 | ||
60 | if (i == 0) { | 69 | if (i == 0) { |
61 | char cpuname[12]; | 70 | char cpuname[12]; |
62 | 71 | ||
63 | seq_printf(p, " "); | 72 | seq_printf(p, "%*s ", prec, ""); |
64 | for_each_present_cpu(cpu) { | 73 | for_each_present_cpu(cpu) { |
65 | sprintf(cpuname, "CPU%d", cpu); | 74 | sprintf(cpuname, "CPU%d", cpu); |
66 | seq_printf(p, " %10s", cpuname); | 75 | seq_printf(p, " %10s", cpuname); |
@@ -75,7 +84,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
75 | if (!action) | 84 | if (!action) |
76 | goto unlock; | 85 | goto unlock; |
77 | 86 | ||
78 | seq_printf(p, "%3d: ", i); | 87 | seq_printf(p, "%*d: ", prec, i); |
79 | for_each_present_cpu(cpu) | 88 | for_each_present_cpu(cpu) |
80 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); | 89 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); |
81 | seq_printf(p, " %10s", desc->chip->name ? : "-"); | 90 | seq_printf(p, " %10s", desc->chip->name ? : "-"); |
@@ -88,13 +97,15 @@ unlock: | |||
88 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 97 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
89 | } else if (i == nr_irqs) { | 98 | } else if (i == nr_irqs) { |
90 | #ifdef CONFIG_FIQ | 99 | #ifdef CONFIG_FIQ |
91 | show_fiq_list(p, v); | 100 | show_fiq_list(p, prec); |
92 | #endif | 101 | #endif |
93 | #ifdef CONFIG_SMP | 102 | #ifdef CONFIG_SMP |
94 | show_ipi_list(p); | 103 | show_ipi_list(p, prec); |
95 | show_local_irqs(p); | 104 | #endif |
105 | #ifdef CONFIG_LOCAL_TIMERS | ||
106 | show_local_irqs(p, prec); | ||
96 | #endif | 107 | #endif |
97 | seq_printf(p, "Err: %10lu\n", irq_err_count); | 108 | seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); |
98 | } | 109 | } |
99 | return 0; | 110 | return 0; |
100 | } | 111 | } |