Module Name:    src
Committed By:   christos
Date:           Sun Jan  2 16:03:46 UTC 2022

Modified Files:
        src/sys/arch/mips/mips: mips_fixup.c

Log Message:
fix KASSERT issue


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/mips/mips_fixup.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/mips/mips/mips_fixup.c
diff -u src/sys/arch/mips/mips/mips_fixup.c:1.22 src/sys/arch/mips/mips/mips_fixup.c:1.23
--- src/sys/arch/mips/mips/mips_fixup.c:1.22	Sat Oct  2 10:28:04 2021
+++ src/sys/arch/mips/mips/mips_fixup.c	Sun Jan  2 11:03:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_fixup.c,v 1.22 2021/10/02 14:28:04 skrll Exp $	*/
+/*	$NetBSD: mips_fixup.c,v 1.23 2022/01/02 16:03:46 christos Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.22 2021/10/02 14:28:04 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_fixup.c,v 1.23 2022/01/02 16:03:46 christos Exp $");
 
 #include "opt_mips3_wired.h"
 #include "opt_multiprocessor.h"
@@ -120,6 +120,7 @@ mips_fixup_exceptions(mips_fixup_callbac
 			if (addr <= load_addr
 			    && load_addr < addr + size
 			    && base == lui_reg) {
+#if defined(DIAGNOSTIC) || defined(DEBUG_VERBOSE)
 				KASSERT(rt == _R_K0 || rt == _R_K1);
 #ifdef DEBUG_VERBOSE
 				printf("%s: %#x: insn %08x: %s r%zu, %%lo(%08x)(r%zu)\n",
@@ -130,6 +131,7 @@ mips_fixup_exceptions(mips_fixup_callbac
 					: INSN_SW_P(insn) ? "sw" : "sd",
 				    rt, load_addr, base);
 #endif
+#endif
 				new_insns[0] = lui_insn;
 				new_insns[1] = *insnp;
 				if ((callback)(load_addr, new_insns, arg)) {

Reply via email to