]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/alpha/kernel/irq.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / alpha / kernel / irq.c
index fe912984d9b1fae21657d36e3b35613525986341..a19d600822991c847eb65e0d943e4b8ff9dd82e1 100644 (file)
@@ -44,10 +44,16 @@ static char irq_user_affinity[NR_IRQS];
 
 int irq_select_affinity(unsigned int irq)
 {
+       struct irq_data *data = irq_get_irq_data(irq);
+       struct irq_chip *chip;
        static int last_cpu;
        int cpu = last_cpu + 1;
 
-       if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq])
+       if (!data)
+               return 1;
+       chip = irq_data_get_irq_chip(data);
+
+       if (!chip->irq_set_affinity || irq_user_affinity[irq])
                return 1;
 
        while (!cpu_possible(cpu) ||
@@ -55,8 +61,8 @@ int irq_select_affinity(unsigned int irq)
                cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
        last_cpu = cpu;
 
-       cpumask_copy(irq_desc[irq].affinity, cpumask_of(cpu));
-       irq_desc[irq].chip->set_affinity(irq, cpumask_of(cpu));
+       cpumask_copy(data->affinity, cpumask_of(cpu));
+       chip->irq_set_affinity(data, cpumask_of(cpu), false);
        return 0;
 }
 #endif /* CONFIG_SMP */
@@ -67,6 +73,7 @@ show_interrupts(struct seq_file *p, void *v)
        int j;
        int irq = *(loff_t *) v;
        struct irqaction * action;
+       struct irq_desc *desc;
        unsigned long flags;
 
 #ifdef CONFIG_SMP
@@ -79,8 +86,13 @@ show_interrupts(struct seq_file *p, void *v)
 #endif
 
        if (irq < ACTUAL_NR_IRQS) {
-               raw_spin_lock_irqsave(&irq_desc[irq].lock, flags);
-               action = irq_desc[irq].action;
+               desc = irq_to_desc(irq);
+
+               if (!desc)
+                       return 0;
+
+               raw_spin_lock_irqsave(&desc->lock, flags);
+               action = desc->action;
                if (!action) 
                        goto unlock;
                seq_printf(p, "%3d: ", irq);
@@ -90,7 +102,7 @@ show_interrupts(struct seq_file *p, void *v)
                for_each_online_cpu(j)
                        seq_printf(p, "%10u ", kstat_irqs_cpu(irq, j));
 #endif
-               seq_printf(p, " %14s", irq_desc[irq].chip->name);
+               seq_printf(p, " %14s", get_irq_desc_chip(desc)->name);
                seq_printf(p, "  %c%s",
                        (action->flags & IRQF_DISABLED)?'+':' ',
                        action->name);
@@ -103,7 +115,7 @@ show_interrupts(struct seq_file *p, void *v)
 
                seq_putc(p, '\n');
 unlock:
-               raw_spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
+               raw_spin_unlock_irqrestore(&desc->lock, flags);
        } else if (irq == ACTUAL_NR_IRQS) {
 #ifdef CONFIG_SMP
                seq_puts(p, "IPI: ");
@@ -142,8 +154,10 @@ handle_irq(int irq)
         * handled by some other CPU. (or is disabled)
         */
        static unsigned int illegal_count=0;
+       struct irq_desc *desc = irq_to_desc(irq);
        
-       if ((unsigned) irq > ACTUAL_NR_IRQS && illegal_count < MAX_ILLEGAL_IRQS ) {
+       if (!desc || ((unsigned) irq > ACTUAL_NR_IRQS &&
+           illegal_count < MAX_ILLEGAL_IRQS)) {
                irq_err_count++;
                illegal_count++;
                printk(KERN_CRIT "device_interrupt: invalid interrupt %d\n",
@@ -151,14 +165,14 @@ handle_irq(int irq)
                return;
        }
 
-       irq_enter();
        /*
-        * __do_IRQ() must be called with IPL_MAX. Note that we do not
+        * From here we must proceed 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);
+       irq_enter();
+       generic_handle_irq_desc(irq, desc);
        irq_exit();
 }