[ARM] 5412/1: XSCALE: add ice dcc support
[safe/jmp/linux-2.6] / arch / arm / kernel / irq.c
index e999b11..363db18 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/ioport.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
-#include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/random.h>
 #include <linux/smp.h>
@@ -39,6 +38,7 @@
 #include <linux/proc_fs.h>
 
 #include <asm/system.h>
+#include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 
 /*
@@ -101,7 +101,7 @@ unlock:
 /* Handle bad interrupts */
 static struct irq_desc bad_irq_desc = {
        .handle_irq = handle_bad_irq,
-       .lock = SPIN_LOCK_UNLOCKED
+       .lock = __SPIN_LOCK_UNLOCKED(bad_irq_desc.lock),
 };
 
 /*
@@ -109,31 +109,31 @@ static struct irq_desc bad_irq_desc = {
  * come via this function.  Instead, they should provide their
  * own 'handler'
  */
-asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
+asmlinkage void __exception asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
 {
-       struct irqdesc *desc = irq_desc + irq;
+       struct pt_regs *old_regs = set_irq_regs(regs);
+
+       irq_enter();
 
        /*
         * Some hardware gives randomly wrong interrupts.  Rather
         * than crashing, do something sensible.
         */
        if (irq >= NR_IRQS)
-               desc = &bad_irq_desc;
-
-       irq_enter();
-
-       set_irq_regs(regs);
-       desc_handle_irq(irq, desc);
+               handle_bad_irq(irq, &bad_irq_desc);
+       else
+               generic_handle_irq(irq);
 
        /* AT91 specific workaround */
        irq_finish(irq);
 
        irq_exit();
+       set_irq_regs(old_regs);
 }
 
 void set_irq_flags(unsigned int irq, unsigned int iflags)
 {
-       struct irqdesc *desc;
+       struct irq_desc *desc;
        unsigned long flags;
 
        if (irq >= NR_IRQS) {
@@ -158,8 +158,7 @@ void __init init_IRQ(void)
        int irq;
 
        for (irq = 0; irq < NR_IRQS; irq++)
-               irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_DELAYED_DISABLE |
-                       IRQ_NOPROBE;
+               irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_NOPROBE;
 
 #ifdef CONFIG_SMP
        bad_irq_desc.affinity = CPU_MASK_ALL;
@@ -170,12 +169,12 @@ void __init init_IRQ(void)
 
 #ifdef CONFIG_HOTPLUG_CPU
 
-static void route_irq(struct irqdesc *desc, unsigned int irq, unsigned int cpu)
+static void route_irq(struct irq_desc *desc, unsigned int irq, unsigned int cpu)
 {
        pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu);
 
        spin_lock_irq(&desc->lock);
-       desc->chip->set_affinity(irq, cpumask_of_cpu(cpu));
+       desc->chip->set_affinity(irq, cpumask_of(cpu));
        spin_unlock_irq(&desc->lock);
 }
 
@@ -189,7 +188,7 @@ void migrate_irqs(void)
        unsigned int i, cpu = smp_processor_id();
 
        for (i = 0; i < NR_IRQS; i++) {
-               struct irqdesc *desc = irq_desc + i;
+               struct irq_desc *desc = irq_desc + i;
 
                if (desc->cpu == cpu) {
                        unsigned int newcpu = any_online_cpu(desc->affinity);