Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sh3/sh3 Use vmspace::vm_minsaddr instead of hardcod...



details:   https://anonhg.NetBSD.org/src/rev/431cbaf97662
branches:  trunk
changeset: 824854:431cbaf97662
user:      uwe <uwe%NetBSD.org@localhost>
date:      Tue Jun 20 23:20:01 2017 +0000

description:
Use vmspace::vm_minsaddr instead of hardcoding USRSTACK.
Requested by joerg@.

diffstat:

 sys/arch/sh3/sh3/exception.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 2a9763dcb70d -r 431cbaf97662 sys/arch/sh3/sh3/exception.c
--- a/sys/arch/sh3/sh3/exception.c      Tue Jun 20 21:04:23 2017 +0000
+++ b/sys/arch/sh3/sh3/exception.c      Tue Jun 20 23:20:01 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exception.c,v 1.64 2015/03/04 09:39:26 skrll Exp $     */
+/*     $NetBSD: exception.c,v 1.65 2017/06/20 23:20:01 uwe Exp $       */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved.
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.64 2015/03/04 09:39:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.65 2017/06/20 23:20:01 uwe Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -393,11 +393,11 @@
        /* User stack extension */
        if (map != kernel_map &&
            (va >= (vaddr_t)l->l_proc->p_vmspace->vm_maxsaddr) &&
-           (va < USRSTACK)) {
+           (va <  (vaddr_t)l->l_proc->p_vmspace->vm_minsaddr)) {
                if (err == 0) {
                        struct vmspace *vm = l->l_proc->p_vmspace;
                        uint32_t nss;
-                       nss = btoc(USRSTACK - va);
+                       nss = btoc((vaddr_t)vm->vm_minsaddr - va);
                        if (nss > vm->vm_ssize)
                                vm->vm_ssize = nss;
                } else if (err == EACCES) {



Home | Main Index | Thread Index | Old Index