diff options
author | peter <peter@FreeBSD.org> | 1999-04-19 14:14:14 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-04-19 14:14:14 +0000 |
commit | a74bdeb7d109443c9e5e0c792c2259175cb4174b (patch) | |
tree | 2acafa9158dea8a7e748a4a8903244b94ab9b1fa /sys/kern | |
parent | 2fc2e936d3183fa2f055ea3ee01fe2cef1596055 (diff) | |
download | FreeBSD-src-a74bdeb7d109443c9e5e0c792c2259175cb4174b.zip FreeBSD-src-a74bdeb7d109443c9e5e0c792c2259175cb4174b.tar.gz |
unifdef -DVM_STACK - it's been on for a while for x86 and was checked
and appeared to be working for the Alpha some time ago.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exec.c | 19 | ||||
-rw-r--r-- | sys/kern/subr_trap.c | 32 |
2 files changed, 2 insertions, 49 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index c96055d..9e85104 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: kern_exec.c,v 1.96 1999/02/19 14:25:34 luoqi Exp $ + * $Id: kern_exec.c,v 1.97 1999/04/03 22:20:01 jdp Exp $ */ #include <sys/param.h> @@ -428,11 +428,7 @@ exec_new_vmspace(imgp) { int error; struct vmspace *vmspace = imgp->proc->p_vmspace; -#ifdef VM_STACK caddr_t stack_addr = (caddr_t) (USRSTACK - MAXSSIZ); -#else - caddr_t stack_addr = (caddr_t) (USRSTACK - SGROWSIZ); -#endif vm_map_t map = &vmspace->vm_map; imgp->vmspace_destroyed = 1; @@ -454,7 +450,6 @@ exec_new_vmspace(imgp) } /* Allocate a new stack */ -#ifdef VM_STACK error = vm_map_stack (&vmspace->vm_map, (vm_offset_t)stack_addr, (vm_size_t)MAXSSIZ, VM_PROT_ALL, VM_PROT_ALL, 0); if (error) @@ -466,18 +461,6 @@ exec_new_vmspace(imgp) */ vmspace->vm_ssize = SGROWSIZ >> PAGE_SHIFT; vmspace->vm_maxsaddr = (char *)USRSTACK - MAXSSIZ; -#else - error = vm_map_insert(&vmspace->vm_map, NULL, 0, - (vm_offset_t) stack_addr, (vm_offset_t) USRSTACK, - VM_PROT_ALL, VM_PROT_ALL, 0); - if (error) - return (error); - - vmspace->vm_ssize = SGROWSIZ >> PAGE_SHIFT; - - /* Initialize maximum stack address */ - vmspace->vm_maxsaddr = (char *)USRSTACK - MAXSSIZ; -#endif return(0); } diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 4498e99..d08306e 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)trap.c 7.4 (Berkeley) 5/13/91 - * $Id: trap.c,v 1.133 1999/01/06 23:05:36 julian Exp $ + * $Id: trap.c,v 1.134 1999/03/09 20:20:09 phk Exp $ */ /* @@ -666,16 +666,6 @@ trap_pfault(frame, usermode, eva) /* * Grow the stack if necessary */ -#ifndef VM_STACK - if ((caddr_t)va > vm->vm_maxsaddr && va < USRSTACK) { - if (!grow(p, va)) { - rv = KERN_FAILURE; - --p->p_lock; - goto nogo; - } - } - -#else /* grow_stack returns false only if va falls into * a growable stack region and the stack growth * fails. It returns true if va was not within @@ -687,7 +677,6 @@ trap_pfault(frame, usermode, eva) --p->p_lock; goto nogo; } -#endif /* Fault in the user page: */ rv = vm_fault(map, va, ftype, @@ -791,15 +780,6 @@ trap_pfault(frame, usermode, eva) /* * Grow the stack if necessary */ -#ifndef VM_STACK - if ((caddr_t)va > vm->vm_maxsaddr && va < USRSTACK) { - if (!grow(p, va)) { - rv = KERN_FAILURE; - --p->p_lock; - goto nogo; - } - } -#else /* grow_stack returns false only if va falls into * a growable stack region and the stack growth * fails. It returns true if va was not within @@ -811,7 +791,6 @@ trap_pfault(frame, usermode, eva) --p->p_lock; goto nogo; } -#endif /* Fault in the user page: */ rv = vm_fault(map, va, ftype, @@ -999,19 +978,10 @@ int trapwrite(addr) ++p->p_lock; -#ifndef VM_STACK - if ((caddr_t)va >= vm->vm_maxsaddr && va < USRSTACK) { - if (!grow(p, va)) { - --p->p_lock; - return (1); - } - } -#else if (!grow_stack (p, va)) { --p->p_lock; return (1); } -#endif /* * fault the data page |