Module Name: src Committed By: skrll Date: Wed Mar 13 06:59:01 UTC 2024
Modified Files: src/sys/arch/evbmips/evbmips: interrupt.c Log Message: Remove #ifdef DIAGNOSTIC by using __diagused. NFCI. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 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.26 src/sys/arch/evbmips/evbmips/interrupt.c:1.27 --- src/sys/arch/evbmips/evbmips/interrupt.c:1.26 Tue Mar 12 21:27:14 2024 +++ src/sys/arch/evbmips/evbmips/interrupt.c Wed Mar 13 06:59:01 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.26 2024/03/12 21:27:14 andvar Exp $ */ +/* $NetBSD: interrupt.c,v 1.27 2024/03/13 06:59:01 skrll Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.26 2024/03/12 21:27:14 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.27 2024/03/13 06:59:01 skrll Exp $"); #include <sys/param.h> #include <sys/cpu.h> @@ -53,11 +53,10 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s struct cpu_info * const ci = curcpu(); uint32_t pending; int ipl; -#ifdef DIAGNOSTIC - const int mtx_count = ci->ci_mtx_count; - const u_int biglock_count = ci->ci_biglock_count; - const u_int blcnt = curlwp->l_blcnt; -#endif + const int mtx_count __diagused = ci->ci_mtx_count; + const u_int biglock_count __diagused = ci->ci_biglock_count; + const u_int blcnt __diagused = curlwp->l_blcnt; + KASSERT(ci->ci_cpl == IPL_HIGH); KDASSERT(mips_cp0_status_read() & MIPS_SR_INT_IE); @@ -94,11 +93,9 @@ cpu_intr(int ppl, vaddr_t pc, uint32_t s /* Process I/O and error interrupts. */ evbmips_iointr(ipl, pending, &cf); } -#ifdef DIAGNOSTIC KASSERT(biglock_count == ci->ci_biglock_count); KASSERT(blcnt == curlwp->l_blcnt); KASSERT(mtx_count == ci->ci_mtx_count); -#endif /* * If even our spl is higher now (due to interrupting while