aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/irq.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 19:50:35 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 19:50:35 -0500
commit3c0cb7c31c206aaedb967e44b98442bbeb17a6c4 (patch)
tree3ecba45d7ffae4fba4a5aafaef4af5b0b1105bde /arch/arm/kernel/irq.c
parentf70f5b9dc74ca7d0a64c4ead3fb28da09dc1b234 (diff)
parent404a02cbd2ae8bf256a2fa1169bdfe86bb5ebb34 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (416 commits) ARM: DMA: add support for DMA debugging ARM: PL011: add DMA burst threshold support for ST variants ARM: PL011: Add support for transmit DMA ARM: PL011: Ensure IRQs are disabled in UART interrupt handler ARM: PL011: Separate hardware FIFO size from TTY FIFO size ARM: PL011: Allow better handling of vendor data ARM: PL011: Ensure error flags are clear at startup ARM: PL011: include revision number in boot-time port printk ARM: vexpress: add sched_clock() for Versatile Express ARM i.MX53: Make MX53 EVK bootable ARM i.MX53: Some bug fix about MX53 MSL code ARM: 6607/1: sa1100: Update platform device registration ARM: 6606/1: sa1100: Fix platform device registration ARM i.MX51: rename IPU irqs ARM i.MX51: Add ipu clock support ARM: imx/mx27_3ds: Add PMIC support ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn() mx51: fix usb clock support MX51: Add support for usb host 2 arch/arm/plat-mxc/ehci.c: fix errors/typos ...
Diffstat (limited to 'arch/arm/kernel/irq.c')
-rw-r--r--arch/arm/kernel/irq.c34
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
50unsigned int arch_nr_irqs;
51void (*init_arch_irq)(void) __initdata = NULL;
52unsigned long irq_err_count; 52unsigned long irq_err_count;
53 53
54int show_interrupts(struct seq_file *p, void *v) 54int 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 */
108asmlinkage void __exception asm_do_IRQ(unsigned int irq, struct pt_regs *regs) 119asmlinkage void __exception_irq_entry
120asm_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
155void __init init_IRQ(void) 167void __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
161int __init arch_probe_nr_irqs(void) 173int __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