Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbmips/evbmips Add a few KDASSERT for interrupts b...



details:   https://anonhg.NetBSD.org/src/rev/72aa01100a3c
branches:  trunk
changeset: 338760:72aa01100a3c
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Jun 06 22:22:03 2015 +0000

description:
Add a few KDASSERT for interrupts being enabled.

diffstat:

 sys/arch/evbmips/evbmips/interrupt.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (39 lines):

diff -r ed4b8d286254 -r 72aa01100a3c sys/arch/evbmips/evbmips/interrupt.c
--- a/sys/arch/evbmips/evbmips/interrupt.c      Sat Jun 06 22:19:07 2015 +0000
+++ b/sys/arch/evbmips/evbmips/interrupt.c      Sat Jun 06 22:22:03 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: interrupt.c,v 1.21 2014/12/26 18:08:52 macallan Exp $  */
+/*     $NetBSD: interrupt.c,v 1.22 2015/06/06 22:22:03 matt Exp $      */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.21 2014/12/26 18:08:52 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.22 2015/06/06 22:22:03 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -61,11 +61,14 @@
        const u_int blcnt = curlwp->l_blcnt;
 #endif
        KASSERT(ci->ci_cpl == IPL_HIGH);
+       KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE);
 
        ci->ci_data.cpu_nintr++;
 
        while (ppl < (ipl = splintr(&pending))) {
+               KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE);
                splx(ipl);      /* lower to interrupt level */
+               KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE);
 
                KASSERTMSG(ci->ci_cpl == ipl,
                    "%s: cpl (%d) != ipl (%d)", __func__, ci->ci_cpl, ipl);
@@ -104,4 +107,5 @@
        }
 
        KASSERT(ci->ci_cpl == IPL_HIGH);
+       KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE);
 }



Home | Main Index | Thread Index | Old Index