X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Firq.c;h=63af36cf7f6e356fc917b1ac86f6e879be5bc0fd;hb=4d3ce21fa9d2eaeda113aa2f9c2da80d972bef64;hp=76be5cf0de13234ea413451dfccc53c62eed3e39;hpb=0595bf3bca9d9932a05b06dd438f40f01d27cd33;p=powerpc.git diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c index 76be5cf0de..63af36cf7f 100644 --- a/arch/alpha/kernel/irq.c +++ b/arch/alpha/kernel/irq.c @@ -49,15 +49,15 @@ select_smp_affinity(unsigned int irq) static int last_cpu; int cpu = last_cpu + 1; - if (!irq_desc[irq].handler->set_affinity || irq_user_affinity[irq]) + if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) return 1; while (!cpu_possible(cpu)) cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); last_cpu = cpu; - irq_affinity[irq] = cpumask_of_cpu(cpu); - irq_desc[irq].handler->set_affinity(irq, cpumask_of_cpu(cpu)); + irq_desc[irq].affinity = cpumask_of_cpu(cpu); + irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu)); return 0; } #endif /* CONFIG_SMP */ @@ -68,34 +68,32 @@ show_interrupts(struct seq_file *p, void *v) #ifdef CONFIG_SMP int j; #endif - int i = *(loff_t *) v; + int irq = *(loff_t *) v; struct irqaction * action; unsigned long flags; #ifdef CONFIG_SMP - if (i == 0) { + if (irq == 0) { seq_puts(p, " "); - for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i)) - seq_printf(p, "CPU%d ", i); + for_each_online_cpu(j) + seq_printf(p, "CPU%d ", j); seq_putc(p, '\n'); } #endif - if (i < ACTUAL_NR_IRQS) { - spin_lock_irqsave(&irq_desc[i].lock, flags); - action = irq_desc[i].action; + if (irq < ACTUAL_NR_IRQS) { + spin_lock_irqsave(&irq_desc[irq].lock, flags); + action = irq_desc[irq].action; if (!action) goto unlock; - seq_printf(p, "%3d: ",i); + seq_printf(p, "%3d: ", irq); #ifndef CONFIG_SMP - seq_printf(p, "%10u ", kstat_irqs(i)); + seq_printf(p, "%10u ", kstat_irqs(irq)); #else - for (j = 0; j < NR_CPUS; j++) - if (cpu_online(j)) - seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]); + for_each_online_cpu(j) + seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq]); #endif - seq_printf(p, " %14s", irq_desc[i].handler->typename); + seq_printf(p, " %14s", irq_desc[irq].chip->typename); seq_printf(p, " %c%s", (action->flags & SA_INTERRUPT)?'+':' ', action->name); @@ -108,13 +106,12 @@ show_interrupts(struct seq_file *p, void *v) seq_putc(p, '\n'); unlock: - spin_unlock_irqrestore(&irq_desc[i].lock, flags); - } else if (i == ACTUAL_NR_IRQS) { + spin_unlock_irqrestore(&irq_desc[irq].lock, flags); + } else if (irq == ACTUAL_NR_IRQS) { #ifdef CONFIG_SMP seq_puts(p, "IPI: "); - for (i = 0; i < NR_CPUS; i++) - if (cpu_online(i)) - seq_printf(p, "%10lu ", cpu_data[i].ipi_count); + for_each_online_cpu(j) + seq_printf(p, "%10lu ", cpu_data[j].ipi_count); seq_putc(p, '\n'); #endif seq_printf(p, "ERR: %10lu\n", irq_err_count); @@ -122,7 +119,6 @@ unlock: return 0; } - /* * handle_irq handles all normal device IRQ's (the special * SMP cross-CPU interrupts have their own specific @@ -155,8 +151,13 @@ handle_irq(int irq, struct pt_regs * regs) } irq_enter(); + /* + * __do_IRQ() must be called with IPL_MAX. Note that we do not + * explicitly enable interrupts afterwards - some MILO PALcode + * (namely LX164 one) seems to have severe problems with RTI + * at IPL 0. + */ local_irq_disable(); __do_IRQ(irq, regs); - local_irq_enable(); irq_exit(); }