aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r--kernel/irq/chip.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 13c68e71b726..b08c0d24f202 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -382,7 +382,10 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
382 382
383 spin_lock(&desc->lock); 383 spin_lock(&desc->lock);
384 desc->status &= ~IRQ_INPROGRESS; 384 desc->status &= ~IRQ_INPROGRESS;
385 if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask) 385
386 if (unlikely(desc->status & IRQ_ONESHOT))
387 desc->status |= IRQ_MASKED;
388 else if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
386 desc->chip->unmask(irq); 389 desc->chip->unmask(irq);
387out_unlock: 390out_unlock:
388 spin_unlock(&desc->lock); 391 spin_unlock(&desc->lock);
@@ -478,8 +481,13 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
478 kstat_incr_irqs_this_cpu(irq, desc); 481 kstat_incr_irqs_this_cpu(irq, desc);
479 482
480 /* Start handling the irq */ 483 /* Start handling the irq */
481 if (desc->chip->ack) 484 if (unlikely(desc->status & IRQ_ONESHOT)) {
482 desc->chip->ack(irq); 485 desc->status |= IRQ_MASKED;
486 mask_ack_irq(desc, irq);
487 } else {
488 if (desc->chip->ack)
489 desc->chip->ack(irq);
490 }
483 491
484 /* Mark the IRQ currently in progress.*/ 492 /* Mark the IRQ currently in progress.*/
485 desc->status |= IRQ_INPROGRESS; 493 desc->status |= IRQ_INPROGRESS;