diff options
Diffstat (limited to 'arch/arm/kernel/irq.c')
-rw-r--r-- | arch/arm/kernel/irq.c | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 36ad3be4692a..8135438b8818 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -35,8 +35,10 @@ | |||
35 | #include <linux/list.h> | 35 | #include <linux/list.h> |
36 | #include <linux/kallsyms.h> | 36 | #include <linux/kallsyms.h> |
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | #include <linux/ftrace.h> | ||
38 | 39 | ||
39 | #include <asm/system.h> | 40 | #include <asm/system.h> |
41 | #include <asm/mach/arch.h> | ||
40 | #include <asm/mach/irq.h> | 42 | #include <asm/mach/irq.h> |
41 | #include <asm/mach/time.h> | 43 | #include <asm/mach/time.h> |
42 | 44 | ||
@@ -47,8 +49,6 @@ | |||
47 | #define irq_finish(irq) do { } while (0) | 49 | #define irq_finish(irq) do { } while (0) |
48 | #endif | 50 | #endif |
49 | 51 | ||
50 | unsigned int arch_nr_irqs; | ||
51 | void (*init_arch_irq)(void) __initdata = NULL; | ||
52 | unsigned long irq_err_count; | 52 | unsigned long irq_err_count; |
53 | 53 | ||
54 | int show_interrupts(struct seq_file *p, void *v) | 54 | int show_interrupts(struct seq_file *p, void *v) |
@@ -57,11 +57,20 @@ 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; | ||
64 | |||
65 | #ifdef CONFIG_SMP | ||
66 | if (prec < 4) | ||
67 | prec = 4; | ||
68 | #endif | ||
60 | 69 | ||
61 | if (i == 0) { | 70 | if (i == 0) { |
62 | char cpuname[12]; | 71 | char cpuname[12]; |
63 | 72 | ||
64 | seq_printf(p, " "); | 73 | seq_printf(p, "%*s ", prec, ""); |
65 | for_each_present_cpu(cpu) { | 74 | for_each_present_cpu(cpu) { |
66 | sprintf(cpuname, "CPU%d", cpu); | 75 | sprintf(cpuname, "CPU%d", cpu); |
67 | seq_printf(p, " %10s", cpuname); | 76 | seq_printf(p, " %10s", cpuname); |
@@ -76,7 +85,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
76 | if (!action) | 85 | if (!action) |
77 | goto unlock; | 86 | goto unlock; |
78 | 87 | ||
79 | seq_printf(p, "%3d: ", i); | 88 | seq_printf(p, "%*d: ", prec, i); |
80 | for_each_present_cpu(cpu) | 89 | for_each_present_cpu(cpu) |
81 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); | 90 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, cpu)); |
82 | seq_printf(p, " %10s", desc->chip->name ? : "-"); | 91 | seq_printf(p, " %10s", desc->chip->name ? : "-"); |
@@ -89,13 +98,15 @@ unlock: | |||
89 | raw_spin_unlock_irqrestore(&desc->lock, flags); | 98 | raw_spin_unlock_irqrestore(&desc->lock, flags); |
90 | } else if (i == nr_irqs) { | 99 | } else if (i == nr_irqs) { |
91 | #ifdef CONFIG_FIQ | 100 | #ifdef CONFIG_FIQ |
92 | show_fiq_list(p, v); | 101 | show_fiq_list(p, prec); |
93 | #endif | 102 | #endif |
94 | #ifdef CONFIG_SMP | 103 | #ifdef CONFIG_SMP |
95 | show_ipi_list(p); | 104 | show_ipi_list(p, prec); |
96 | show_local_irqs(p); | 105 | #endif |
106 | #ifdef CONFIG_LOCAL_TIMERS | ||
107 | show_local_irqs(p, prec); | ||
97 | #endif | 108 | #endif |
98 | seq_printf(p, "Err: %10lu\n", irq_err_count); | 109 | seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count); |
99 | } | 110 | } |
100 | return 0; | 111 | return 0; |
101 | } | 112 | } |
@@ -105,7 +116,8 @@ unlock: | |||
105 | * come via this function. Instead, they should provide their | 116 | * come via this function. Instead, they should provide their |
106 | * own 'handler' | 117 | * own 'handler' |
107 | */ | 118 | */ |
108 | asmlinkage void __exception asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | 119 | asmlinkage void __exception_irq_entry |
120 | asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | ||
109 | { | 121 | { |
110 | struct pt_regs *old_regs = set_irq_regs(regs); | 122 | struct pt_regs *old_regs = set_irq_regs(regs); |
111 | 123 | ||
@@ -154,13 +166,13 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
154 | 166 | ||
155 | void __init init_IRQ(void) | 167 | void __init init_IRQ(void) |
156 | { | 168 | { |
157 | init_arch_irq(); | 169 | machine_desc->init_irq(); |
158 | } | 170 | } |
159 | 171 | ||
160 | #ifdef CONFIG_SPARSE_IRQ | 172 | #ifdef CONFIG_SPARSE_IRQ |
161 | int __init arch_probe_nr_irqs(void) | 173 | int __init arch_probe_nr_irqs(void) |
162 | { | 174 | { |
163 | nr_irqs = arch_nr_irqs ? arch_nr_irqs : NR_IRQS; | 175 | nr_irqs = machine_desc->nr_irqs ? machine_desc->nr_irqs : NR_IRQS; |
164 | return nr_irqs; | 176 | return nr_irqs; |
165 | } | 177 | } |
166 | #endif | 178 | #endif |