summaryrefslogtreecommitdiff
path: root/sys/arch/sh
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2007-02-06 23:12:02 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2007-02-06 23:12:02 +0000
commit69e26346d106308170a7dcd32af51d0c9accbb0b (patch)
treeca96d0efef5034af4d5ae920e71e96de9b29acd4 /sys/arch/sh
parentedf6f88ae9200110423d88ff207347ffaaea31d2 (diff)
Use uvm_grow() instead of rolling our own inline version.
Diffstat (limited to 'sys/arch/sh')
-rw-r--r--sys/arch/sh/sh/trap.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/arch/sh/sh/trap.c b/sys/arch/sh/sh/trap.c
index 6d6aeb70ab7..d19a634256b 100644
--- a/sys/arch/sh/sh/trap.c
+++ b/sys/arch/sh/sh/trap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trap.c,v 1.6 2006/11/05 18:57:22 miod Exp $ */
+/* $OpenBSD: trap.c,v 1.7 2007/02/06 23:12:01 miod Exp $ */
/* $NetBSD: exception.c,v 1.32 2006/09/04 23:57:52 uwe Exp $ */
/* $NetBSD: syscall.c,v 1.6 2006/03/07 07:21:50 thorpej Exp $ */
@@ -412,15 +412,10 @@ tlb_exception(struct proc *p, struct trapframe *tf, uint32_t va)
if (map != kernel_map &&
(va >= (vaddr_t)p->p_vmspace->vm_maxsaddr) &&
(va < USRSTACK)) {
- if (err == 0) {
- struct vmspace *vm = p->p_vmspace;
- uint32_t nss;
- nss = btoc(USRSTACK - va);
- if (nss > vm->vm_ssize)
- vm->vm_ssize = nss;
- } else if (err == EACCES) {
+ if (err == 0)
+ uvm_grow(p, va);
+ else if (err == EACCES)
err = EFAULT;
- }
}
/* Page in. load PTE to TLB. */