]> err.no Git - linux-2.6/blobdiff - kernel/irq/resend.c
futex: correctly return -EFAULT not -EINVAL
[linux-2.6] / kernel / irq / resend.c
index 096b102fb392e0de14478fb0944c2009f766e88c..a8046791ba2d3fde84853ac7a7bfbb0bbca07b84 100644 (file)
@@ -37,9 +37,9 @@ static void resend_irqs(unsigned long arg)
                irq = find_first_bit(irqs_resend, NR_IRQS);
                clear_bit(irq, irqs_resend);
                desc = irq_desc + irq;
-               spin_lock_irqsave(&desc->lock, flags);
-               desc->handle_irq(irq, desc, NULL);
-               spin_unlock_irqrestore(&desc->lock, flags);
+               local_irq_disable();
+               desc->handle_irq(irq, desc);
+               local_irq_enable();
        }
 }
 
@@ -62,9 +62,13 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
         */
        desc->chip->enable(irq);
 
-       if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
-               desc->status &= ~IRQ_PENDING;
-               desc->status = status | IRQ_REPLAY;
+       /*
+        * We do not resend level type interrupts. Level type
+        * interrupts are resent by hardware when they are still
+        * active.
+        */
+       if ((status & (IRQ_LEVEL | IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
+               desc->status = (status & ~IRQ_PENDING) | IRQ_REPLAY;
 
                if (!desc->chip || !desc->chip->retrigger ||
                                        !desc->chip->retrigger(irq)) {