aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/irq.c')
-rw-r--r--arch/parisc/kernel/irq.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 197936d9359a..5b8803cc3d69 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */ 23 */
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/config.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/interrupt.h> 27#include <linux/interrupt.h>
@@ -94,7 +93,7 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest)
94 if (irq == TIMER_IRQ || irq == IPI_IRQ) { 93 if (irq == TIMER_IRQ || irq == IPI_IRQ) {
95 /* Bad linux design decision. The mask has already 94 /* Bad linux design decision. The mask has already
96 * been set; we must reset it */ 95 * been set; we must reset it */
97 irq_affinity[irq] = CPU_MASK_ALL; 96 irq_desc[irq].affinity = CPU_MASK_ALL;
98 return -EINVAL; 97 return -EINVAL;
99 } 98 }
100 99
@@ -110,7 +109,7 @@ static void cpu_set_affinity_irq(unsigned int irq, cpumask_t dest)
110 if (cpu_check_affinity(irq, &dest)) 109 if (cpu_check_affinity(irq, &dest))
111 return; 110 return;
112 111
113 irq_affinity[irq] = dest; 112 irq_desc[irq].affinity = dest;
114} 113}
115#endif 114#endif
116 115
@@ -125,6 +124,10 @@ static struct hw_interrupt_type cpu_interrupt_type = {
125#ifdef CONFIG_SMP 124#ifdef CONFIG_SMP
126 .set_affinity = cpu_set_affinity_irq, 125 .set_affinity = cpu_set_affinity_irq,
127#endif 126#endif
127 /* XXX: Needs to be written. We managed without it so far, but
128 * we really ought to write it.
129 */
130 .retrigger = NULL,
128}; 131};
129 132
130int show_interrupts(struct seq_file *p, void *v) 133int show_interrupts(struct seq_file *p, void *v)
@@ -158,7 +161,7 @@ int show_interrupts(struct seq_file *p, void *v)
158 seq_printf(p, "%10u ", kstat_irqs(i)); 161 seq_printf(p, "%10u ", kstat_irqs(i));
159#endif 162#endif
160 163
161 seq_printf(p, " %14s", irq_desc[i].handler->typename); 164 seq_printf(p, " %14s", irq_desc[i].chip->typename);
162#ifndef PARISC_IRQ_CR16_COUNTS 165#ifndef PARISC_IRQ_CR16_COUNTS
163 seq_printf(p, " %s", action->name); 166 seq_printf(p, " %s", action->name);
164 167
@@ -210,12 +213,12 @@ int cpu_claim_irq(unsigned int irq, struct hw_interrupt_type *type, void *data)
210{ 213{
211 if (irq_desc[irq].action) 214 if (irq_desc[irq].action)
212 return -EBUSY; 215 return -EBUSY;
213 if (irq_desc[irq].handler != &cpu_interrupt_type) 216 if (irq_desc[irq].chip != &cpu_interrupt_type)
214 return -EBUSY; 217 return -EBUSY;
215 218
216 if (type) { 219 if (type) {
217 irq_desc[irq].handler = type; 220 irq_desc[irq].chip = type;
218 irq_desc[irq].handler_data = data; 221 irq_desc[irq].chip_data = data;
219 cpu_interrupt_type.enable(irq); 222 cpu_interrupt_type.enable(irq);
220 } 223 }
221 return 0; 224 return 0;
@@ -265,7 +268,7 @@ int txn_alloc_irq(unsigned int bits_wide)
265unsigned long txn_affinity_addr(unsigned int irq, int cpu) 268unsigned long txn_affinity_addr(unsigned int irq, int cpu)
266{ 269{
267#ifdef CONFIG_SMP 270#ifdef CONFIG_SMP
268 irq_affinity[irq] = cpumask_of_cpu(cpu); 271 irq_desc[irq].affinity = cpumask_of_cpu(cpu);
269#endif 272#endif
270 273
271 return cpu_data[cpu].txn_addr; 274 return cpu_data[cpu].txn_addr;
@@ -326,7 +329,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
326 /* Work our way from MSb to LSb...same order we alloc EIRs */ 329 /* Work our way from MSb to LSb...same order we alloc EIRs */
327 for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) { 330 for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) {
328#ifdef CONFIG_SMP 331#ifdef CONFIG_SMP
329 cpumask_t dest = irq_affinity[irq]; 332 cpumask_t dest = irq_desc[irq].affinity;
330#endif 333#endif
331 if (!(bit & eirr_val)) 334 if (!(bit & eirr_val))
332 continue; 335 continue;
@@ -363,14 +366,14 @@ void do_cpu_irq_mask(struct pt_regs *regs)
363static struct irqaction timer_action = { 366static struct irqaction timer_action = {
364 .handler = timer_interrupt, 367 .handler = timer_interrupt,
365 .name = "timer", 368 .name = "timer",
366 .flags = SA_INTERRUPT, 369 .flags = IRQF_DISABLED,
367}; 370};
368 371
369#ifdef CONFIG_SMP 372#ifdef CONFIG_SMP
370static struct irqaction ipi_action = { 373static struct irqaction ipi_action = {
371 .handler = ipi_interrupt, 374 .handler = ipi_interrupt,
372 .name = "IPI", 375 .name = "IPI",
373 .flags = SA_INTERRUPT, 376 .flags = IRQF_DISABLED,
374}; 377};
375#endif 378#endif
376 379
@@ -378,7 +381,7 @@ static void claim_cpu_irqs(void)
378{ 381{
379 int i; 382 int i;
380 for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) { 383 for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
381 irq_desc[i].handler = &cpu_interrupt_type; 384 irq_desc[i].chip = &cpu_interrupt_type;
382 } 385 }
383 386
384 irq_desc[TIMER_IRQ].action = &timer_action; 387 irq_desc[TIMER_IRQ].action = &timer_action;
@@ -404,13 +407,6 @@ void __init init_IRQ(void)
404 407
405} 408}
406 409
407void hw_resend_irq(struct hw_interrupt_type *type, unsigned int irq)
408{
409 /* XXX: Needs to be written. We managed without it so far, but
410 * we really ought to write it.
411 */
412}
413
414void ack_bad_irq(unsigned int irq) 410void ack_bad_irq(unsigned int irq)
415{ 411{
416 printk("unexpected IRQ %d\n", irq); 412 printk("unexpected IRQ %d\n", irq);