Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/cortex revert rev 1.4:



details:   https://anonhg.NetBSD.org/src/rev/95137d9dd815
branches:  trunk
changeset: 451936:95137d9dd815
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Jun 12 11:35:17 2019 +0000

description:
revert rev 1.4:
>Adjust priority mappings, NFCI

it has some unintended change that makes nvme hangy.  ok @jmcneill.

diffstat:

 sys/arch/arm/cortex/gicv3.c |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 9a912fd2d125 -r 95137d9dd815 sys/arch/arm/cortex/gicv3.c
--- a/sys/arch/arm/cortex/gicv3.c       Wed Jun 12 10:27:59 2019 +0000
+++ b/sys/arch/arm/cortex/gicv3.c       Wed Jun 12 11:35:17 2019 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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 @@
        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 @@
 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 @@
                        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 @@
 {
        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);
 }



Home | Main Index | Thread Index | Old Index