vserver 1.9.5.x5
[linux-2.6.git] / arch / cris / kernel / irq.c
index a963dda..d848b94 100644 (file)
@@ -36,9 +36,9 @@
 #include <linux/init.h>
 #include <linux/seq_file.h>
 #include <linux/errno.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
-#include <asm/bitops.h>
 
 /* Defined in arch specific irq.c */
 extern void arch_setup_irq(int irq);
@@ -125,7 +125,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
 {
        struct irqaction *action;
        int do_random, cpu;
-        int retval = 0;
+        int ret, retval = 0;
 
         cpu = smp_processor_id();
         irq_enter();
@@ -137,8 +137,10 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
                         local_irq_enable();
                 do_random = 0;
                 do {
-                        do_random |= action->flags;
-                        retval |= action->handler(irq, action->dev_id, regs);
+                       ret = action->handler(irq, action->dev_id, regs);
+                       if (ret == IRQ_HANDLED)
+                               do_random |= action->flags;
+                        retval |= ret;
                         action = action->next;
                 } while (action);
 
@@ -156,11 +158,6 @@ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
                local_irq_disable();
         }
         irq_exit();
-
-       if (softirq_pending(cpu))
-                do_softirq();
-
-        /* unmasking and bottom half handling is done magically for us. */
 }
 
 /* this function links in a handler into the chain of handlers for the
@@ -240,7 +237,7 @@ int request_irq(unsigned int irq,
 
        action->handler = handler;
        action->flags = irqflags;
-       action->mask = 0;
+       cpus_clear(action->mask);
        action->name = devname;
        action->next = NULL;
        action->dev_id = dev_id;