diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:32:52 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-01-06 17:32:52 -0500 |
commit | 4073723acb9cdcdbe4df9c0e0c376c65d1697e43 (patch) | |
tree | f41c17eac157b1223ce104845cf9b1e5a9e6a83d /arch/arm/kernel/irq.c | |
parent | 58daf18cdcab550262a5f4681e1f1e073e21965a (diff) | |
parent | 4ec3eb13634529c0bc7466658d84d0bbe3244aea (diff) |
Merge branch 'misc' into devel
Conflicts:
arch/arm/Kconfig
arch/arm/common/Makefile
arch/arm/kernel/Makefile
arch/arm/kernel/smp.c
Diffstat (limited to 'arch/arm/kernel/irq.c')
-rw-r--r-- | arch/arm/kernel/irq.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 6d616333340f..8135438b8818 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/ftrace.h> | 38 | #include <linux/ftrace.h> |
39 | 39 | ||
40 | #include <asm/system.h> | 40 | #include <asm/system.h> |
41 | #include <asm/mach/arch.h> | ||
41 | #include <asm/mach/irq.h> | 42 | #include <asm/mach/irq.h> |
42 | #include <asm/mach/time.h> | 43 | #include <asm/mach/time.h> |
43 | 44 | ||
@@ -48,8 +49,6 @@ | |||
48 | #define irq_finish(irq) do { } while (0) | 49 | #define irq_finish(irq) do { } while (0) |
49 | #endif | 50 | #endif |
50 | 51 | ||
51 | unsigned int arch_nr_irqs; | ||
52 | void (*init_arch_irq)(void) __initdata = NULL; | ||
53 | unsigned long irq_err_count; | 52 | unsigned long irq_err_count; |
54 | 53 | ||
55 | int show_interrupts(struct seq_file *p, void *v) | 54 | int show_interrupts(struct seq_file *p, void *v) |
@@ -58,11 +57,20 @@ int show_interrupts(struct seq_file *p, void *v) | |||
58 | struct irq_desc *desc; | 57 | struct irq_desc *desc; |
59 | struct irqaction * action; | 58 | struct irqaction * action; |
60 | 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; | ||
64 | |||
65 | #ifdef CONFIG_SMP | ||
66 | if (prec < 4) | ||
67 | prec = 4; | ||
68 | #endif | ||
61 | 69 | ||
62 | if (i == 0) { | 70 | if (i == 0) { |
63 | char cpuname[12]; | 71 | char cpuname[12]; |
64 | 72 | ||
65 | seq_printf(p, " "); | 73 | seq_printf(p, "%*s ", prec, ""); |
66 | for_each_present_cpu(cpu) { | 74 | for_each_present_cpu(cpu) { |
67 | sprintf(cpuname, "CPU%d", cpu); | 75 | sprintf(cpuname, "CPU%d", cpu); |
68 | seq_printf(p, " %10s", cpuname); | 76 | seq_printf(p, " %10s", cpuname); |
@@ -77,7 +85,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
77 | if (!action) | 85 | if (!action) |
78 | goto unlock; | 86 | goto unlock; |
79 | 87 | ||
80 | seq_printf(p, "%3d: ", i); | 88 | seq_printf(p, "%*d: ", prec, i); |
81 | for_each_present_cpu(cpu) | 89 | for_each_present_cpu(cpu) |
82 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); | 90 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); |
83 | seq_printf(p, " %10s", desc->chip->name ? : "-"); | 91 | seq_printf(p, " %10s", desc->chip->name ? : "-"); |
@@ -90,13 +98,15 @@ unlock: | |||
90 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 98 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
91 | } else if (i == nr_irqs) { | 99 | } else if (i == nr_irqs) { |
92 | #ifdef CONFIG_FIQ | 100 | #ifdef CONFIG_FIQ |
93 | show_fiq_list(p, v); | 101 | show_fiq_list(p, prec); |
94 | #endif | 102 | #endif |
95 | #ifdef CONFIG_SMP | 103 | #ifdef CONFIG_SMP |
96 | show_ipi_list(p); | 104 | show_ipi_list(p, prec); |
97 | show_local_irqs(p); | 105 | #endif |
106 | #ifdef CONFIG_LOCAL_TIMERS | ||
107 | show_local_irqs(p, prec); | ||
98 | #endif | 108 | #endif |
99 | seq_printf(p, "Err: %10lu\n", irq_err_count); | 109 | seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); |
100 | } | 110 | } |
101 | return 0; | 111 | return 0; |
102 | } | 112 | } |
@@ -156,13 +166,13 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
156 | 166 | ||
157 | void __init init_IRQ(void) | 167 | void __init init_IRQ(void) |
158 | { | 168 | { |
159 | init_arch_irq(); | 169 | machine_desc->init_irq(); |
160 | } | 170 | } |
161 | 171 | ||
162 | #ifdef CONFIG_SPARSE_IRQ | 172 | #ifdef CONFIG_SPARSE_IRQ |
163 | int __init arch_probe_nr_irqs(void) | 173 | int __init arch_probe_nr_irqs(void) |
164 | { | 174 | { |
165 | nr_irqs = arch_nr_irqs ? arch_nr_irqs : NR_IRQS; | 175 | nr_irqs = machine_desc->nr_irqs ? machine_desc->nr_irqs : NR_IRQS; |
166 | return nr_irqs; | 176 | return nr_irqs; |
167 | } | 177 | } |
168 | #endif | 178 | #endif |