summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-12-06 20:12:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-12-06 20:12:26 +0000
commit120d8ac9c11b65f4f5ea455c3ece1377f7c9f5e9 (patch)
treec6379e62ac806f3ca515fd801b4b656553be0348 /sys/arch/hppa
parente8f58ee282d9d19ac7b1f6c8c781fd5af48073cc (diff)
Use uvm_grow() to account for stack growth, rather than home-grown code
or nothing. Inspired by a similar recent change in NetBSD.
Diffstat (limited to 'sys/arch/hppa')
-rw-r--r--sys/arch/hppa/hppa/trap.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c
index 2b42af14fc2..022bcc0f97e 100644
--- a/sys/arch/hppa/hppa/trap.c
+++ b/sys/arch/hppa/hppa/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.81 2004/09/14 22:44:58 mickey Exp $ */
+/* $OpenBSD: trap.c,v 1.82 2004/12/06 20:12:24 miod Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
@@ -421,13 +421,10 @@ trap(type, frame)
* error.
*/
if (space != HPPA_SID_KERNEL &&
- va < (vaddr_t)vm->vm_minsaddr &&
- va >= (vaddr_t)vm->vm_maxsaddr + ctob(vm->vm_ssize)) {
- if (ret == 0) {
- vsize_t nss = btoc(va - USRSTACK + NBPG - 1);
- if (nss > vm->vm_ssize)
- vm->vm_ssize = nss;
- } else if (ret == EACCES)
+ va < (vaddr_t)vm->vm_minsaddr) {
+ if (ret == 0)
+ uvm_grow(p, va);
+ else if (ret == EACCES)
ret = EFAULT;
}