diff options
-rw-r--r-- | kernel/irq/chip.c | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index a2b28a2fd7b1..f10c2e58a786 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -540,19 +540,29 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) | |||
540 | raw_spin_lock(&desc->lock); | 540 | raw_spin_lock(&desc->lock); |
541 | 541 | ||
542 | desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); | 542 | desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); |
543 | |||
543 | /* | 544 | /* |
544 | * If we're currently running this IRQ, or its disabled, | 545 | * If the handler is currently running, mark it pending, |
545 | * we shouldn't process the IRQ. Mark it pending, handle | 546 | * handle the necessary masking and go out |
546 | * the necessary masking and go out | ||
547 | */ | 547 | */ |
548 | if (unlikely(irqd_irq_disabled(&desc->irq_data) || | 548 | if (unlikely(irqd_irq_inprogress(&desc->irq_data))) { |
549 | irqd_irq_inprogress(&desc->irq_data) || !desc->action)) { | ||
550 | if (!irq_check_poll(desc)) { | 549 | if (!irq_check_poll(desc)) { |
551 | desc->istate |= IRQS_PENDING; | 550 | desc->istate |= IRQS_PENDING; |
552 | mask_ack_irq(desc); | 551 | mask_ack_irq(desc); |
553 | goto out_unlock; | 552 | goto out_unlock; |
554 | } | 553 | } |
555 | } | 554 | } |
555 | |||
556 | /* | ||
557 | * If its disabled or no action available then mask it and get | ||
558 | * out of here. | ||
559 | */ | ||
560 | if (irqd_irq_disabled(&desc->irq_data) || !desc->action) { | ||
561 | desc->istate |= IRQS_PENDING; | ||
562 | mask_ack_irq(desc); | ||
563 | goto out_unlock; | ||
564 | } | ||
565 | |||
556 | kstat_incr_irqs_this_cpu(irq, desc); | 566 | kstat_incr_irqs_this_cpu(irq, desc); |
557 | 567 | ||
558 | /* Start handling the irq */ | 568 | /* Start handling the irq */ |
@@ -601,18 +611,27 @@ void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc) | |||
601 | raw_spin_lock(&desc->lock); | 611 | raw_spin_lock(&desc->lock); |
602 | 612 | ||
603 | desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); | 613 | desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING); |
614 | |||
604 | /* | 615 | /* |
605 | * If we're currently running this IRQ, or its disabled, | 616 | * If the handler is currently running, mark it pending, |
606 | * we shouldn't process the IRQ. Mark it pending, handle | 617 | * handle the necessary masking and go out |
607 | * the necessary masking and go out | ||
608 | */ | 618 | */ |
609 | if (unlikely(irqd_irq_disabled(&desc->irq_data) || | 619 | if (unlikely(irqd_irq_inprogress(&desc->irq_data))) { |
610 | irqd_irq_inprogress(&desc->irq_data) || !desc->action)) { | ||
611 | if (!irq_check_poll(desc)) { | 620 | if (!irq_check_poll(desc)) { |
612 | desc->istate |= IRQS_PENDING; | 621 | desc->istate |= IRQS_PENDING; |
613 | goto out_eoi; | 622 | goto out_eoi; |
614 | } | 623 | } |
615 | } | 624 | } |
625 | |||
626 | /* | ||
627 | * If its disabled or no action available then mask it and get | ||
628 | * out of here. | ||
629 | */ | ||
630 | if (irqd_irq_disabled(&desc->irq_data) || !desc->action) { | ||
631 | desc->istate |= IRQS_PENDING; | ||
632 | goto out_eoi; | ||
633 | } | ||
634 | |||
616 | kstat_incr_irqs_this_cpu(irq, desc); | 635 | kstat_incr_irqs_this_cpu(irq, desc); |
617 | 636 | ||
618 | do { | 637 | do { |