diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-03-25 17:20:51 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-03-29 08:47:58 -0400 |
commit | a6e120ed42004d6051fff7c3233e2554f12ccecb (patch) | |
tree | dd0210b2f78a5fca1b24fe8211d5dbaac9434a6b /arch/alpha/kernel | |
parent | a9eb076b21425929ce543978db03265d9db210de (diff) |
alpha: Use generic show_interrupts()
The only subtle difference is that alpha uses ACTUAL_NR_IRQS and
prints the IRQF_DISABLED flag.
Change the generic implementation to deal with ACTUAL_NR_IRQS if
defined.
The IRQF_DISABLED printing is pointless, as we nowadays run all
interrupts with irqs disabled.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/alpha/kernel')
-rw-r--r-- | arch/alpha/kernel/irq.c | 67 |
1 files changed, 10 insertions, 57 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index 1461d7c53b41..381431a2d6d9 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c | |||
@@ -67,68 +67,21 @@ int irq_select_affinity(unsigned int irq) | |||
67 | } | 67 | } |
68 | #endif /* CONFIG_SMP */ | 68 | #endif /* CONFIG_SMP */ |
69 | 69 | ||
70 | int | 70 | int arch_show_interrupts(struct seq_file *p, int prec) |
71 | show_interrupts(struct seq_file *p, void *v) | ||
72 | { | 71 | { |
73 | int j; | 72 | int j; |
74 | int irq = *(loff_t *) v; | ||
75 | struct irqaction * action; | ||
76 | struct irq_desc *desc; | ||
77 | unsigned long flags; | ||
78 | 73 | ||
79 | #ifdef CONFIG_SMP | 74 | #ifdef CONFIG_SMP |
80 | if (irq == 0) { | 75 | seq_puts(p, "IPI: "); |
81 | seq_puts(p, " "); | 76 | for_each_online_cpu(j) |
82 | for_each_online_cpu(j) | 77 | seq_printf(p, "%10lu ", cpu_data[j].ipi_count); |
83 | seq_printf(p, "CPU%d ", j); | 78 | seq_putc(p, '\n'); |
84 | seq_putc(p, '\n'); | ||
85 | } | ||
86 | #endif | ||
87 | |||
88 | if (irq < ACTUAL_NR_IRQS) { | ||
89 | desc = irq_to_desc(irq); | ||
90 | |||
91 | if (!desc) | ||
92 | return 0; | ||
93 | |||
94 | raw_spin_lock_irqsave(&desc->lock, flags); | ||
95 | action = desc->action; | ||
96 | if (!action) | ||
97 | goto unlock; | ||
98 | seq_printf(p, "%3d: ", irq); | ||
99 | #ifndef CONFIG_SMP | ||
100 | seq_printf(p, "%10u ", kstat_irqs(irq)); | ||
101 | #else | ||
102 | for_each_online_cpu(j) | ||
103 | seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j)); | ||
104 | #endif | 79 | #endif |
105 | seq_printf(p, " %14s", irq_desc_get_chip(desc)->name); | 80 | seq_puts(p, "PMI: "); |
106 | seq_printf(p, " %c%s", | 81 | for_each_online_cpu(j) |
107 | (action->flags & IRQF_DISABLED)?'+':' ', | 82 | seq_printf(p, "%10lu ", per_cpu(irq_pmi_count, j)); |
108 | action->name); | 83 | seq_puts(p, " Performance Monitoring\n"); |
109 | 84 | seq_printf(p, "ERR: %10lu\n", irq_err_count); | |
110 | for (action=action->next; action; action = action->next) { | ||
111 | seq_printf(p, ", %c%s", | ||
112 | (action->flags & IRQF_DISABLED)?'+':' ', | ||
113 | action->name); | ||
114 | } | ||
115 | |||
116 | seq_putc(p, '\n'); | ||
117 | unlock: | ||
118 | raw_spin_unlock_irqrestore(&desc->lock, flags); | ||
119 | } else if (irq == ACTUAL_NR_IRQS) { | ||
120 | #ifdef CONFIG_SMP | ||
121 | seq_puts(p, "IPI: "); | ||
122 | for_each_online_cpu(j) | ||
123 | seq_printf(p, "%10lu ", cpu_data[j].ipi_count); | ||
124 | seq_putc(p, '\n'); | ||
125 | #endif | ||
126 | seq_puts(p, "PMI: "); | ||
127 | for_each_online_cpu(j) | ||
128 | seq_printf(p, "%10lu ", per_cpu(irq_pmi_count, j)); | ||
129 | seq_puts(p, " Performance Monitoring\n"); | ||
130 | seq_printf(p, "ERR: %10lu\n", irq_err_count); | ||
131 | } | ||
132 | return 0; | 85 | return 0; |
133 | } | 86 | } |
134 | 87 | ||