Module Name:    src
Committed By:   andvar
Date:           Tue Oct 24 18:01:31 UTC 2023

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

Log Message:
move locore.h include above pte.h, which uses some of its definitions.
fix typo in pte_valid_p() argument, *pte->*ptep.

makes this file build with KGDB option enabled on MIPS archs.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/mips/kgdb_machdep.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/kgdb_machdep.c
diff -u src/sys/arch/mips/mips/kgdb_machdep.c:1.18 src/sys/arch/mips/mips/kgdb_machdep.c:1.19
--- src/sys/arch/mips/mips/kgdb_machdep.c:1.18	Mon Jul 11 16:15:36 2016
+++ src/sys/arch/mips/mips/kgdb_machdep.c	Tue Oct 24 18:01:31 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kgdb_machdep.c,v 1.18 2016/07/11 16:15:36 matt Exp $	*/
+/*	$NetBSD: kgdb_machdep.c,v 1.19 2023/10/24 18:01:31 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.18 2016/07/11 16:15:36 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kgdb_machdep.c,v 1.19 2023/10/24 18:01:31 andvar Exp $");
 
 #include "opt_ddb.h"
 
@@ -81,9 +81,9 @@ __KERNEL_RCSID(0, "$NetBSD: kgdb_machdep
 
 #include <uvm/uvm_extern.h>
 
+#include <mips/locore.h>
 #include <mips/pte.h>
 #include <mips/cpu.h>
-#include <mips/locore.h>
 #include <mips/mips_opcode.h>
 #include <mips/reg.h>
 #include <mips/trap.h>
@@ -105,7 +105,7 @@ kvacc(vaddr_t kva)
 		return 0;
 
 	const pt_entry_t * const ptep = pmap_pte_lookup(pmap_kernel(), kva);
-	return ptep != NULL && pte_valid_p(*pte);
+	return ptep != NULL && pte_valid_p(*ptep);
 }
 
 /*

Reply via email to