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 Adjust priority mappings, NFCI
details: https://anonhg.NetBSD.org/src/rev/76b0873ba9f4
branches: trunk
changeset: 457113:76b0873ba9f4
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Jun 12 10:02:17 2019 +0000
description:
Adjust priority mappings, NFCI
diffstat:
sys/arch/arm/cortex/gicv3.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r da54e43ff00b -r 76b0873ba9f4 sys/arch/arm/cortex/gicv3.c
--- a/sys/arch/arm/cortex/gicv3.c Wed Jun 12 10:00:09 2019 +0000
+++ b/sys/arch/arm/cortex/gicv3.c Wed Jun 12 10:02:17 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.13 2018/11/23 11:49:04 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.14 2019/06/12 10:02:17 jmcneill 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.13 2018/11/23 11:49:04 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.14 2019/06/12 10:02:17 jmcneill 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);
+ const u_int ipriority_val = 0x80 | (IPL_TO_PRIORITY(is->is_ipl) >> 1);
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) << 1);
+ icc_pmr_write(IPL_TO_PRIORITY(ipl));
}
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);
+ const u_int ipriority_val = 0x80 | (IPL_TO_PRIORITY(is->is_ipl) >> 1);
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) | GIC_LPICONF_Res1;
+ sc->sc_lpiconf.base[is->is_irq] = 0x80 | (IPL_TO_PRIORITY(is->is_ipl) >> 1) | 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