Module Name: src Committed By: mrg Date: Wed Jun 12 11:35:18 UTC 2019
Modified Files: src/sys/arch/arm/cortex: gicv3.c Log Message: revert rev 1.4: >Adjust priority mappings, NFCI it has some unintended change that makes nvme hangy. ok @jmcneill. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/cortex/gicv3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/arm/cortex/gicv3.c diff -u src/sys/arch/arm/cortex/gicv3.c:1.16 src/sys/arch/arm/cortex/gicv3.c:1.17 --- src/sys/arch/arm/cortex/gicv3.c:1.16 Wed Jun 12 10:27:59 2019 +++ src/sys/arch/arm/cortex/gicv3.c Wed Jun 12 11:35:17 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: gicv3.c,v 1.16 2019/06/12 10:27:59 jmcneill Exp $ */ +/* $NetBSD: gicv3.c,v 1.17 2019/06/12 11:35:17 mrg Exp $ */ /*- * Copyright (c) 2018 Jared McNeill <jmcne...@invisible.ca> @@ -31,7 +31,7 @@ #define _INTR_PRIVATE #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.16 2019/06/12 10:27:59 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.17 2019/06/12 11:35:17 mrg Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -155,7 +155,7 @@ gicv3_establish_irq(struct pic_softc *pi uint64_t irouter; u_int n; - const u_int ipriority_val = 0x80 | (IPL_TO_PRIORITY(is->is_ipl) >> 1); + const u_int ipriority_val = 0x80 | IPL_TO_PRIORITY(is->is_ipl); const u_int ipriority_shift = (is->is_irq & 0x3) * 8; const u_int icfg_shift = (is->is_irq & 0xf) * 2; @@ -206,7 +206,7 @@ gicv3_establish_irq(struct pic_softc *pi static void gicv3_set_priority(struct pic_softc *pic, int ipl) { - icc_pmr_write(IPL_TO_PRIORITY(ipl)); + icc_pmr_write(IPL_TO_PRIORITY(ipl) << 1); } static void @@ -271,7 +271,7 @@ gicv3_redist_enable(struct gicv3_softc * if (is == NULL) priority |= 0xff << byte_shift; else { - const u_int ipriority_val = 0x80 | (IPL_TO_PRIORITY(is->is_ipl) >> 1); + const u_int ipriority_val = 0x80 | IPL_TO_PRIORITY(is->is_ipl); priority |= ipriority_val << byte_shift; } } @@ -545,7 +545,7 @@ gicv3_lpi_establish_irq(struct pic_softc { struct gicv3_softc * const sc = LPITOSOFTC(pic); - sc->sc_lpiconf.base[is->is_irq] = 0x80 | (IPL_TO_PRIORITY(is->is_ipl) >> 1) | GIC_LPICONF_Res1; + sc->sc_lpiconf.base[is->is_irq] = 0x80 | IPL_TO_PRIORITY(is->is_ipl) | GIC_LPICONF_Res1; bus_dmamap_sync(sc->sc_dmat, sc->sc_lpiconf.map, is->is_irq, 1, BUS_DMASYNC_PREWRITE); }