diff options
author | jake <jake@FreeBSD.org> | 2002-04-20 17:28:08 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-04-20 17:28:08 +0000 |
commit | 09774b833e42d06622f749a7fe2df92703d9c05f (patch) | |
tree | 0f620d2d59285cce64ffd68ff6129e195b48853e | |
parent | b5175f501bb32dba3e63a58c2c1709974891000b (diff) | |
download | FreeBSD-src-09774b833e42d06622f749a7fe2df92703d9c05f.zip FreeBSD-src-09774b833e42d06622f749a7fe2df92703d9c05f.tar.gz |
MFi386 1.222. Remove vm_map_growstack and acquisition and release of Giant
from trap_pfault.
-rw-r--r-- | sys/sparc64/sparc64/trap.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c index ff974a6..0d635e1 100644 --- a/sys/sparc64/sparc64/trap.c +++ b/sys/sparc64/sparc64/trap.c @@ -450,8 +450,6 @@ trap_pfault(struct thread *td, struct trapframe *tf) */ vm = p->p_vmspace; - mtx_lock(&Giant); - /* * Keep swapout from messing with us during this * critical time. @@ -460,17 +458,8 @@ trap_pfault(struct thread *td, struct trapframe *tf) ++p->p_lock; PROC_UNLOCK(p); - /* - * Grow the stack if necessary. vm_map_growstack only - * fails if the va falls into a growable stack region - * and the stack growth fails. If it succeeds, or the - * va was not within a growable stack region, fault in - * the user page. - */ - if (vm_map_growstack(p, va) != KERN_SUCCESS) - rv = KERN_FAILURE; - else - rv = vm_fault(&vm->vm_map, va, prot, flags); + /* Fault in the user page. */ + rv = vm_fault(&vm->vm_map, va, prot, flags); /* * Now the process can be swapped again. @@ -487,15 +476,12 @@ trap_pfault(struct thread *td, struct trapframe *tf) KASSERT(tf->tf_tstate & TSTATE_PRIV, ("trap_pfault: fault on nucleus context from user mode")); - mtx_lock(&Giant); - /* * Don't have to worry about process locking or stacks in the * kernel. */ rv = vm_fault(kernel_map, va, prot, VM_FAULT_NORMAL); } - mtx_unlock(&Giant); CTR3(KTR_TRAP, "trap_pfault: return td=%p va=%#lx rv=%d", td, va, rv); |