summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-04-27 17:00:28 +0000
committeralc <alc@FreeBSD.org>2002-04-27 17:00:28 +0000
commit13bef9693df0fc59522e38528cd5d63d9a5f6fa5 (patch)
treeb17bad99d95b4f120ed63de17cf000245c574309 /sys/powerpc
parentf9bbacbcce49ac738c454d4569d6e7ac97ff6c26 (diff)
downloadFreeBSD-src-13bef9693df0fc59522e38528cd5d63d9a5f6fa5.zip
FreeBSD-src-13bef9693df0fc59522e38528cd5d63d9a5f6fa5.tar.gz
MFi386 1.222: Remove vm_map_growstack() and acquisition and release of Giant
around vm_fault() in trap_pfault().
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/aim/trap.c19
-rw-r--r--sys/powerpc/powerpc/trap.c19
2 files changed, 4 insertions, 34 deletions
diff --git a/sys/powerpc/aim/trap.c b/sys/powerpc/aim/trap.c
index 1de9b05..097c59d 100644
--- a/sys/powerpc/aim/trap.c
+++ b/sys/powerpc/aim/trap.c
@@ -479,7 +479,6 @@ trap_pfault(struct trapframe *frame, int user)
}
va = trunc_page(eva);
- mtx_lock(&Giant);
if (map != kernel_map) {
/*
* Keep swapout from messing with us during this
@@ -489,20 +488,8 @@ trap_pfault(struct trapframe *frame, int user)
++p->p_lock;
PROC_UNLOCK(p);
- /*
- * Grow the stack if necessary
- */
- /* vm_map_growstack returns failure only if va falls into
- * a growable stack region and the stack growth
- * fails. It succeeds if va was not within
- * a growable stack region, or if the stack
- * growth succeeded.
- */
- if (vm_map_growstack(p, va) != KERN_SUCCESS)
- rv = KERN_FAILURE;
- else
- /* Fault in the user page: */
- rv = vm_fault(map, va, ftype,
+ /* Fault in the user page: */
+ rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
@@ -516,8 +503,6 @@ trap_pfault(struct trapframe *frame, int user)
*/
rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
}
- mtx_unlock(&Giant);
-
if (rv == KERN_SUCCESS)
return (0);
diff --git a/sys/powerpc/powerpc/trap.c b/sys/powerpc/powerpc/trap.c
index 1de9b05..097c59d 100644
--- a/sys/powerpc/powerpc/trap.c
+++ b/sys/powerpc/powerpc/trap.c
@@ -479,7 +479,6 @@ trap_pfault(struct trapframe *frame, int user)
}
va = trunc_page(eva);
- mtx_lock(&Giant);
if (map != kernel_map) {
/*
* Keep swapout from messing with us during this
@@ -489,20 +488,8 @@ trap_pfault(struct trapframe *frame, int user)
++p->p_lock;
PROC_UNLOCK(p);
- /*
- * Grow the stack if necessary
- */
- /* vm_map_growstack returns failure only if va falls into
- * a growable stack region and the stack growth
- * fails. It succeeds if va was not within
- * a growable stack region, or if the stack
- * growth succeeded.
- */
- if (vm_map_growstack(p, va) != KERN_SUCCESS)
- rv = KERN_FAILURE;
- else
- /* Fault in the user page: */
- rv = vm_fault(map, va, ftype,
+ /* Fault in the user page: */
+ rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
@@ -516,8 +503,6 @@ trap_pfault(struct trapframe *frame, int user)
*/
rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
}
- mtx_unlock(&Giant);
-
if (rv == KERN_SUCCESS)
return (0);
OpenPOWER on IntegriCloud