Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/sunxi Remove a bogus KASSERT and clear IRQ pend...
details: https://anonhg.NetBSD.org/src/rev/fbc3a01b6858
branches: trunk
changeset: 356758:fbc3a01b6858
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Oct 11 00:17:03 2017 +0000
description:
Remove a bogus KASSERT and clear IRQ pending status as handle them
diffstat:
sys/arch/arm/sunxi/sunxi_intc.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (43 lines):
diff -r 06e4531fe789 -r fbc3a01b6858 sys/arch/arm/sunxi/sunxi_intc.c
--- a/sys/arch/arm/sunxi/sunxi_intc.c Tue Oct 10 21:37:49 2017 +0000
+++ b/sys/arch/arm/sunxi/sunxi_intc.c Wed Oct 11 00:17:03 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_intc.c,v 1.1 2017/08/25 00:07:03 jmcneill Exp $ */
+/* $NetBSD: sunxi_intc.c,v 1.2 2017/10/11 00:17:03 jmcneill Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -29,7 +29,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunxi_intc.c,v 1.1 2017/08/25 00:07:03 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_intc.c,v 1.2 2017/10/11 00:17:03 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -177,12 +177,13 @@
uint32_t pend;
pend = INTC_READ(sc, INTC_IRQ_PEND_REG(group));
-
- KASSERT((sc->sc_enabled_irqs[group] & pend) == pend);
+ pend &= sc->sc_enabled_irqs[group];
if (pend == 0)
return 0;
+ INTC_WRITE(sc, INTC_IRQ_PEND_REG(group), pend);
+
return pic_mark_pending_sources(&sc->sc_pic, group * 32, pend);
}
@@ -246,6 +247,8 @@
for (i = 0; i < INTC_MAX_GROUPS; i++) {
INTC_WRITE(sc, INTC_EN_REG(i), 0);
INTC_WRITE(sc, INTC_MASK_REG(i), 0);
+ INTC_WRITE(sc, INTC_IRQ_PEND_REG(i),
+ INTC_READ(sc, INTC_IRQ_PEND_REG(i)));
}
/* Disable user mode access to intc registers */
INTC_WRITE(sc, INTC_PROTECT_REG, INTC_PROTECT_EN);
Home |
Main Index |
Thread Index |
Old Index