diff options
Diffstat (limited to 'arch/sh/kernel/irq.c')
-rw-r--r-- | arch/sh/kernel/irq.c | 61 |
1 files changed, 2 insertions, 59 deletions
diff --git a/arch/sh/kernel/irq.c b/arch/sh/kernel/irq.c index 68ecbe6c881a..64ea0b165399 100644 --- a/arch/sh/kernel/irq.c +++ b/arch/sh/kernel/irq.c | |||
@@ -34,9 +34,9 @@ void ack_bad_irq(unsigned int irq) | |||
34 | 34 | ||
35 | #if defined(CONFIG_PROC_FS) | 35 | #if defined(CONFIG_PROC_FS) |
36 | /* | 36 | /* |
37 | * /proc/interrupts printing: | 37 | * /proc/interrupts printing for arch specific interrupts |
38 | */ | 38 | */ |
39 | static int show_other_interrupts(struct seq_file *p, int prec) | 39 | int arch_show_interrupts(struct seq_file *p, int prec) |
40 | { | 40 | { |
41 | int j; | 41 | int j; |
42 | 42 | ||
@@ -49,63 +49,6 @@ static int show_other_interrupts(struct seq_file *p, int prec) | |||
49 | 49 | ||
50 | return 0; | 50 | return 0; |
51 | } | 51 | } |
52 | |||
53 | int show_interrupts(struct seq_file *p, void *v) | ||
54 | { | ||
55 | unsigned long flags, any_count = 0; | ||
56 | int i = *(loff_t *)v, j, prec; | ||
57 | struct irqaction *action; | ||
58 | struct irq_desc *desc; | ||
59 | struct irq_data *data; | ||
60 | struct irq_chip *chip; | ||
61 | |||
62 | if (i > nr_irqs) | ||
63 | return 0; | ||
64 | |||
65 | for (prec = 3, j = 1000; prec < 10 && j <= nr_irqs; ++prec) | ||
66 | j *= 10; | ||
67 | |||
68 | if (i == nr_irqs) | ||
69 | return show_other_interrupts(p, prec); | ||
70 | |||
71 | if (i == 0) { | ||
72 | seq_printf(p, "%*s", prec + 8, ""); | ||
73 | for_each_online_cpu(j) | ||
74 | seq_printf(p, "CPU%-8d", j); | ||
75 | seq_putc(p, '\n'); | ||
76 | } | ||
77 | |||
78 | desc = irq_to_desc(i); | ||
79 | if (!desc) | ||
80 | return 0; | ||
81 | |||
82 | data = irq_get_irq_data(i); | ||
83 | chip = irq_data_get_irq_chip(data); | ||
84 | |||
85 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
86 | for_each_online_cpu(j) | ||
87 | any_count |= kstat_irqs_cpu(i, j); | ||
88 | action = desc->action; | ||
89 | if (!action && !any_count) | ||
90 | goto out; | ||
91 | |||
92 | seq_printf(p, "%*d: ", prec, i); | ||
93 | for_each_online_cpu(j) | ||
94 | seq_printf(p, "%10u ", kstat_irqs_cpu(i, j)); | ||
95 | seq_printf(p, " %14s", chip->name); | ||
96 | seq_printf(p, "-%-8s", desc->name); | ||
97 | |||
98 | if (action) { | ||
99 | seq_printf(p, " %s", action->name); | ||
100 | while ((action = action->next) != NULL) | ||
101 | seq_printf(p, ", %s", action->name); | ||
102 | } | ||
103 | |||
104 | seq_putc(p, '\n'); | ||
105 | out: | ||
106 | raw_spin_unlock_irqrestore(&desc->lock, flags); | ||
107 | return 0; | ||
108 | } | ||
109 | #endif | 52 | #endif |
110 | 53 | ||
111 | #ifdef CONFIG_IRQSTACKS | 54 | #ifdef CONFIG_IRQSTACKS |