Author: kan
Date: Thu Apr 13 14:23:27 2017
New Revision: 316757
URL: https://svnweb.freebsd.org/changeset/base/316757

Log:
  Use proper fields to check for interrupt trigger mode.

Modified:
  head/sys/arm/arm/gic.c
  head/sys/arm64/arm64/gic_v3.c

Modified: head/sys/arm/arm/gic.c
==============================================================================
--- head/sys/arm/arm/gic.c      Thu Apr 13 13:46:01 2017        (r316756)
+++ head/sys/arm/arm/gic.c      Thu Apr 13 14:23:27 2017        (r316757)
@@ -987,7 +987,7 @@ arm_gic_setup_intr(device_t dev, struct 
                gi->gi_trig = trig;
 
                /* Edge triggered interrupts need an early EOI sent */
-               if (gi->gi_pol == INTR_TRIGGER_EDGE)
+               if (gi->gi_trig == INTR_TRIGGER_EDGE)
                        gi->gi_flags |= GI_FLAG_EARLY_EOI;
        }
 

Modified: head/sys/arm64/arm64/gic_v3.c
==============================================================================
--- head/sys/arm64/arm64/gic_v3.c       Thu Apr 13 13:46:01 2017        
(r316756)
+++ head/sys/arm64/arm64/gic_v3.c       Thu Apr 13 14:23:27 2017        
(r316757)
@@ -437,11 +437,11 @@ arm_gic_v3_intr(void *arg)
 #endif
                } else if (active_irq >= GIC_FIRST_PPI &&
                    active_irq <= GIC_LAST_SPI) {
-                       if (gi->gi_pol == INTR_TRIGGER_EDGE)
+                       if (gi->gi_trig == INTR_TRIGGER_EDGE)
                                gic_icc_write(EOIR1, gi->gi_irq);
 
                        if (intr_isrc_dispatch(&gi->gi_isrc, tf) != 0) {
-                               if (gi->gi_pol != INTR_TRIGGER_EDGE)
+                               if (gi->gi_trig != INTR_TRIGGER_EDGE)
                                        gic_icc_write(EOIR1, gi->gi_irq);
                                gic_v3_disable_intr(sc->dev, &gi->gi_isrc);
                                device_printf(sc->dev,
@@ -781,7 +781,7 @@ gic_v3_post_filter(device_t dev, struct 
 {
        struct gic_v3_irqsrc *gi = (struct gic_v3_irqsrc *)isrc;
 
-       if (gi->gi_pol == INTR_TRIGGER_EDGE)
+       if (gi->gi_trig == INTR_TRIGGER_EDGE)
                return;
 
        gic_icc_write(EOIR1, gi->gi_irq);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to