Module Name: src Committed By: uwe Date: Tue Jun 20 23:20:01 UTC 2017
Modified Files: src/sys/arch/sh3/sh3: exception.c Log Message: Use vmspace::vm_minsaddr instead of hardcoding USRSTACK. Requested by joerg@. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sh3/sh3/exception.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/sh3/sh3/exception.c diff -u src/sys/arch/sh3/sh3/exception.c:1.64 src/sys/arch/sh3/sh3/exception.c:1.65 --- src/sys/arch/sh3/sh3/exception.c:1.64 Wed Mar 4 09:39:26 2015 +++ src/sys/arch/sh3/sh3/exception.c Tue Jun 20 23:20:01 2017 @@ -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 @@ tlb_exception(struct lwp *l, struct trap /* 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) {