Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-7-0]: src/sys Pull up following revision(s) (requested by mrg in ...



details:   https://anonhg.NetBSD.org/src/rev/50b969beef34
branches:  netbsd-7-0
changeset: 801243:50b969beef34
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Dec 03 11:43:13 2016 +0000

description:
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.

diffstat:

 sys/arch/mips/include/vmparam.h |  4 ++--
 sys/uvm/pmap/pmap_segtab.c      |  8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r d9e3a59e18e5 -r 50b969beef34 sys/arch/mips/include/vmparam.h
--- a/sys/arch/mips/include/vmparam.h   Mon Nov 21 07:24:40 2016 +0000
+++ b/sys/arch/mips/include/vmparam.h   Sat Dec 03 11:43:13 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.52 2014/01/25 15:16:50 christos Exp $    */
+/*     $NetBSD: vmparam.h,v 1.52.8.1 2016/12/03 11:43:13 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
diff -r d9e3a59e18e5 -r 50b969beef34 sys/uvm/pmap/pmap_segtab.c
--- a/sys/uvm/pmap/pmap_segtab.c        Mon Nov 21 07:24:40 2016 +0000
+++ b/sys/uvm/pmap/pmap_segtab.c        Sat Dec 03 11:43:13 2016 +0000
@@ -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.18.1 2016/12/03 11:43:13 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.18.1 2016/12/03 11:43:13 martin Exp $");
 
 /*
  *     Manages physical address maps.
@@ -190,7 +190,9 @@
 {
        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) {



Home | Main Index | Thread Index | Old Index