Module Name:    src
Committed By:   matt
Date:           Sat Jun  6 22:22:03 UTC 2015

Modified Files:
        src/sys/arch/evbmips/evbmips: interrupt.c

Log Message:
Add a few KDASSERT for interrupts being enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/evbmips/evbmips/interrupt.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/evbmips/evbmips/interrupt.c
diff -u src/sys/arch/evbmips/evbmips/interrupt.c:1.21 src/sys/arch/evbmips/evbmips/interrupt.c:1.22
--- src/sys/arch/evbmips/evbmips/interrupt.c:1.21	Fri Dec 26 18:08:52 2014
+++ src/sys/arch/evbmips/evbmips/interrupt.c	Sat Jun  6 22:22:03 2015
@@ -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 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s
 	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 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s
 	}
 
 	KASSERT(ci->ci_cpl == IPL_HIGH);
+	KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE);
 }

Reply via email to