Module Name:    src
Committed By:   matt
Date:           Mon Aug 16 23:38:01 UTC 2010

Modified Files:
        src/sys/arch/mips/include [matt-nb5-mips64]: pcb.h
        src/sys/arch/mips/mips [matt-nb5-mips64]: trap.c

Log Message:
fix a typo and add a few missing ifdefs.
Only worry about setting seg0tab if the faulting va would use it.


To generate a diff of this commit:
cvs rdiff -u -r1.20.62.4 -r1.20.62.5 src/sys/arch/mips/include/pcb.h
cvs rdiff -u -r1.217.12.29 -r1.217.12.30 src/sys/arch/mips/mips/trap.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/include/pcb.h
diff -u src/sys/arch/mips/include/pcb.h:1.20.62.4 src/sys/arch/mips/include/pcb.h:1.20.62.5
--- src/sys/arch/mips/include/pcb.h:1.20.62.4	Mon Aug 16 18:01:13 2010
+++ src/sys/arch/mips/include/pcb.h	Mon Aug 16 23:38:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pcb.h,v 1.20.62.4 2010/08/16 18:01:13 matt Exp $	*/
+/*	$NetBSD: pcb.h,v 1.20.62.5 2010/08/16 23:38:01 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -88,7 +88,7 @@
 	u_int pfi_repeats;
 	pid_t pfi_lastpid;
 	uint8_t pfi_faulttype;
-}
+};
 
 /*
  * MIPS process control block

Index: src/sys/arch/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.217.12.29 src/sys/arch/mips/mips/trap.c:1.217.12.30
--- src/sys/arch/mips/mips/trap.c:1.217.12.29	Mon Aug 16 23:26:28 2010
+++ src/sys/arch/mips/mips/trap.c	Mon Aug 16 23:38:01 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.217.12.29 2010/08/16 23:26:28 matt Exp $	*/
+/*	$NetBSD: trap.c,v 1.217.12.30 2010/08/16 23:38:01 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -78,7 +78,7 @@
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.217.12.29 2010/08/16 23:26:28 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.217.12.30 2010/08/16 23:38:01 matt Exp $");
 
 #include "opt_cputype.h"	/* which mips CPU levels do we support? */
 #include "opt_ddb.h"
@@ -391,7 +391,7 @@
 		 * cpu's cpu_info but not other cpu's) so we need to detect
 		 * and fix this here.
 		 */
-		if ((va >> 31) == 0 &&
+		if ((va >> XSEGSHIFT) == 0 &&
 		    __predict_false(ci->ci_pmap_seg0tab == NULL
 				&& ci->ci_pmap_segtab->seg_seg[0] != NULL)) {
 			ci->ci_pmap_seg0tab = ci->ci_pmap_segtab->seg_seg[0];
@@ -455,11 +455,13 @@
 		}
 		l->l_pflag &= ~LP_SA_PAGEFAULT;
 		if (rv == 0) {
+#ifdef PMAP_FAULTINFO
 			if (pfi->pfi_repeats == 0) {
 				pfi->pfi_faultpte =
 				    pmap_pte_lookup(map->pmap, va);
 			}
 			KASSERT(((pt_entry_t *)(pfi->pfi_faultpte))->pt_entry);
+#endif
 			if (type & T_USER) {
 				userret(l);
 			}

Reply via email to