Module Name:    src
Committed By:   martin
Date:           Sat Dec  3 12:08:36 UTC 2016

Modified Files:
        src/sys/arch/mips/include [netbsd-7]: vmparam.h
        src/sys/uvm/pmap [netbsd-7]: pmap_segtab.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1275):
        sys/arch/mips/include/vmparam.h: revision 1.57
        sys/uvm/pmap/pmap_segtab.c: revision 1.4
1TB is enough UVA for anyone... plus not all cpus can support more.
fix the start index generation in pmap_segtab_release() to
ensure it fits in the actual array.  fixes N64 binaries from
triggering later panic.  move the panic check itself into a
common function that is called from a couple of new places too.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.52.4.1 src/sys/arch/mips/include/vmparam.h
cvs rdiff -u -r1.1 -r1.1.14.1 src/sys/uvm/pmap/pmap_segtab.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/vmparam.h
diff -u src/sys/arch/mips/include/vmparam.h:1.52 src/sys/arch/mips/include/vmparam.h:1.52.4.1
--- src/sys/arch/mips/include/vmparam.h:1.52	Sat Jan 25 15:16:50 2014
+++ src/sys/arch/mips/include/vmparam.h	Sat Dec  3 12:08:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.52 2014/01/25 15:16:50 christos Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.52.4.1 2016/12/03 12:08:36 martin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -152,7 +152,7 @@
  */
 #define VM_MIN_ADDRESS		((vaddr_t)0x00000000)
 #ifdef _LP64
-#define MIPS_VM_MAXUSER_ADDRESS	((vaddr_t) 1L << (4*PGSHIFT-8))
+#define MIPS_VM_MAXUSER_ADDRESS	((vaddr_t) 1L << 40)
 #ifdef ENABLE_MIPS_16KB_PAGE
 #define VM_MAXUSER_ADDRESS	mips_vm_maxuser_address
 #else

Index: src/sys/uvm/pmap/pmap_segtab.c
diff -u src/sys/uvm/pmap/pmap_segtab.c:1.1 src/sys/uvm/pmap/pmap_segtab.c:1.1.14.1
--- src/sys/uvm/pmap/pmap_segtab.c:1.1	Wed Oct  3 00:51:46 2012
+++ src/sys/uvm/pmap/pmap_segtab.c	Sat Dec  3 12:08:36 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_segtab.c,v 1.1 2012/10/03 00:51:46 christos Exp $	*/
+/*	$NetBSD: pmap_segtab.c,v 1.1.14.1 2016/12/03 12:08:36 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
 
 #include <sys/cdefs.h>
 
-__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.1 2012/10/03 00:51:46 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_segtab.c,v 1.1.14.1 2016/12/03 12:08:36 martin Exp $");
 
 /*
  *	Manages physical address maps.
@@ -190,7 +190,9 @@ pmap_segtab_release(pmap_t pmap, pmap_se
 {
 	pmap_segtab_t *stp = *stp_p;
 
-	for (size_t i = va / vinc; i < PMAP_SEGTABSIZE; i++, va += vinc) {
+	for (size_t i = (va / vinc) & (PMAP_SEGTABSIZE - 1);
+	     i < PMAP_SEGTABSIZE;
+	     i++, va += vinc) {
 #ifdef _LP64
 		if (vinc > NBSEG) {
 			if (stp->seg_seg[i] != NULL) {

Reply via email to