@@ -742,40 +742,27 @@ void handle_fasteoi_nmi(struct irq_desc *desc)
742
742
EXPORT_SYMBOL_GPL (handle_fasteoi_nmi );
743
743
744
744
/**
745
- * handle_edge_irq - edge type IRQ handler
746
- * @desc: the interrupt description structure for this irq
745
+ * handle_edge_irq - edge type IRQ handler
746
+ * @desc: the interrupt description structure for this irq
747
747
*
748
- * Interrupt occurs on the falling and/or rising edge of a hardware
749
- * signal. The occurrence is latched into the irq controller hardware
750
- * and must be acked in order to be reenabled. After the ack another
751
- * interrupt can happen on the same source even before the first one
752
- * is handled by the associated event handler. If this happens it
753
- * might be necessary to disable (mask) the interrupt depending on the
754
- * controller hardware. This requires to reenable the interrupt inside
755
- * of the loop which handles the interrupts which have arrived while
756
- * the handler was running. If all pending interrupts are handled, the
757
- * loop is left.
748
+ * Interrupt occurs on the falling and/or rising edge of a hardware
749
+ * signal. The occurrence is latched into the irq controller hardware and
750
+ * must be acked in order to be reenabled. After the ack another interrupt
751
+ * can happen on the same source even before the first one is handled by
752
+ * the associated event handler. If this happens it might be necessary to
753
+ * disable (mask) the interrupt depending on the controller hardware. This
754
+ * requires to reenable the interrupt inside of the loop which handles the
755
+ * interrupts which have arrived while the handler was running. If all
756
+ * pending interrupts are handled, the loop is left.
758
757
*/
759
758
void handle_edge_irq (struct irq_desc * desc )
760
759
{
761
- raw_spin_lock (& desc -> lock );
762
-
763
- desc -> istate &= ~(IRQS_REPLAY | IRQS_WAITING );
764
-
765
- if (!irq_can_handle_pm (desc )) {
766
- desc -> istate |= IRQS_PENDING ;
767
- mask_ack_irq (desc );
768
- goto out_unlock ;
769
- }
760
+ guard (raw_spinlock )(& desc -> lock );
770
761
771
- /*
772
- * If its disabled or no action available then mask it and get
773
- * out of here.
774
- */
775
- if (irqd_irq_disabled (& desc -> irq_data ) || !desc -> action ) {
762
+ if (!irq_can_handle (desc )) {
776
763
desc -> istate |= IRQS_PENDING ;
777
764
mask_ack_irq (desc );
778
- goto out_unlock ;
765
+ return ;
779
766
}
780
767
781
768
kstat_incr_irqs_this_cpu (desc );
@@ -786,7 +773,7 @@ void handle_edge_irq(struct irq_desc *desc)
786
773
do {
787
774
if (unlikely (!desc -> action )) {
788
775
mask_irq (desc );
789
- goto out_unlock ;
776
+ return ;
790
777
}
791
778
792
779
/*
@@ -802,11 +789,7 @@ void handle_edge_irq(struct irq_desc *desc)
802
789
803
790
handle_irq_event (desc );
804
791
805
- } while ((desc -> istate & IRQS_PENDING ) &&
806
- !irqd_irq_disabled (& desc -> irq_data ));
807
-
808
- out_unlock :
809
- raw_spin_unlock (& desc -> lock );
792
+ } while ((desc -> istate & IRQS_PENDING ) && !irqd_irq_disabled (& desc -> irq_data ));
810
793
}
811
794
EXPORT_SYMBOL (handle_edge_irq );
812
795
0 commit comments