From 11011dfc945c9bbb417846d00889059260e2bfd5 Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Thu, 13 Apr 2017 14:23:27 +0000 Subject: [PATCH] Use proper fields to check for interrupt trigger mode. --- sys/arm/arm/gic.c | 2 +- sys/arm64/arm64/gic_v3.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm/arm/gic.c b/sys/arm/arm/gic.c index 3148b24d14d2..233f410d4866 100644 --- a/sys/arm/arm/gic.c +++ b/sys/arm/arm/gic.c @@ -987,7 +987,7 @@ arm_gic_setup_intr(device_t dev, struct intr_irqsrc *isrc, 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; } diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index b01b937694bf..9aae4a0d2d63 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -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 intr_irqsrc *isrc) { 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);