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.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index cb450e1e79b3..c0b1affc06a8 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -113,13 +113,8 @@ int cpu_check_affinity(struct irq_data *d, const struct cpumask *dest)
113 int cpu_dest; 113 int cpu_dest;
114 114
115 /* timer and ipi have to always be received on all CPUs */ 115 /* timer and ipi have to always be received on all CPUs */
116 if (CHECK_IRQ_PER_CPU(irq_to_desc(d->irq)->status)) { 116 if (irqd_is_per_cpu(d))
117 /* Bad linux design decision. The mask has already
118 * been set; we must reset it. Will fix - tglx
119 */
120 cpumask_setall(d->affinity);
121 return -EINVAL; 117 return -EINVAL;
122 }
123 118
124 /* whatever mask they set, we just allow one CPU */ 119 /* whatever mask they set, we just allow one CPU */
125 cpu_dest = first_cpu(*dest); 120 cpu_dest = first_cpu(*dest);
@@ -174,10 +169,11 @@ int show_interrupts(struct seq_file *p, void *v)
174 } 169 }
175 170
176 if (i < NR_IRQS) { 171 if (i < NR_IRQS) {
172 struct irq_desc *desc = irq_to_desc(i);
177 struct irqaction *action; 173 struct irqaction *action;
178 174
179 raw_spin_lock_irqsave(&irq_desc[i].lock, flags); 175 raw_spin_lock_irqsave(&desc->lock, flags);
180 action = irq_desc[i].action; 176 action = desc->action;
181 if (!action) 177 if (!action)
182 goto skip; 178 goto skip;
183 seq_printf(p, "%3d: ", i); 179 seq_printf(p, "%3d: ", i);
@@ -188,7 +184,7 @@ int show_interrupts(struct seq_file *p, void *v)
188 seq_printf(p, "%10u ", kstat_irqs(i)); 184 seq_printf(p, "%10u ", kstat_irqs(i));
189#endif 185#endif
190 186
191 seq_printf(p, " %14s", irq_desc[i].irq_data.chip->name); 187 seq_printf(p, " %14s", irq_desc_get_chip(desc)->name);
192#ifndef PARISC_IRQ_CR16_COUNTS 188#ifndef PARISC_IRQ_CR16_COUNTS
193 seq_printf(p, " %s", action->name); 189 seq_printf(p, " %s", action->name);
194 190
@@ -220,7 +216,7 @@ int show_interrupts(struct seq_file *p, void *v)
220 216
221 seq_putc(p, '\n'); 217 seq_putc(p, '\n');
222 skip: 218 skip:
223 raw_spin_unlock_irqrestore(&irq_desc[i].lock, flags); 219 raw_spin_unlock_irqrestore(&desc->lock, flags);
224 } 220 }
225 221
226 return 0; 222 return 0;
@@ -238,15 +234,15 @@ int show_interrupts(struct seq_file *p, void *v)
238 234
239int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data) 235int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
240{ 236{
241 if (irq_desc[irq].action) 237 if (irq_has_action(irq))
242 return -EBUSY; 238 return -EBUSY;
243 if (get_irq_chip(irq) != &cpu_interrupt_type) 239 if (irq_get_chip(irq) != &cpu_interrupt_type)
244 return -EBUSY; 240 return -EBUSY;
245 241
246 /* for iosapic interrupts */ 242 /* for iosapic interrupts */
247 if (type) { 243 if (type) {
248 set_irq_chip_and_handler(irq, type, handle_percpu_irq); 244 irq_set_chip_and_handler(irq, type, handle_percpu_irq);
249 set_irq_chip_data(irq, data); 245 irq_set_chip_data(irq, data);
250 __cpu_unmask_irq(irq); 246 __cpu_unmask_irq(irq);
251 } 247 }
252 return 0; 248 return 0;
@@ -357,7 +353,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
357#ifdef CONFIG_SMP 353#ifdef CONFIG_SMP
358 desc = irq_to_desc(irq); 354 desc = irq_to_desc(irq);
359 cpumask_copy(&dest, desc->irq_data.affinity); 355 cpumask_copy(&dest, desc->irq_data.affinity);
360 if (CHECK_IRQ_PER_CPU(desc->status) && 356 if (irqd_is_per_cpu(&desc->irq_data) &&
361 !cpu_isset(smp_processor_id(), dest)) { 357 !cpu_isset(smp_processor_id(), dest)) {
362 int cpu = first_cpu(dest); 358 int cpu = first_cpu(dest);
363 359
@@ -398,14 +394,14 @@ static void claim_cpu_irqs(void)
398{ 394{
399 int i; 395 int i;
400 for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) { 396 for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
401 set_irq_chip_and_handler(i, &cpu_interrupt_type, 397 irq_set_chip_and_handler(i, &cpu_interrupt_type,
402 handle_percpu_irq); 398 handle_percpu_irq);
403 } 399 }
404 400
405 set_irq_handler(TIMER_IRQ, handle_percpu_irq); 401 irq_set_handler(TIMER_IRQ, handle_percpu_irq);
406 setup_irq(TIMER_IRQ, &timer_action); 402 setup_irq(TIMER_IRQ, &timer_action);
407#ifdef CONFIG_SMP 403#ifdef CONFIG_SMP
408 set_irq_handler(IPI_IRQ, handle_percpu_irq); 404 irq_set_handler(IPI_IRQ, handle_percpu_irq);
409 setup_irq(IPI_IRQ, &ipi_action); 405 setup_irq(IPI_IRQ, &ipi_action);
410#endif 406#endif
411} 407}