From 120d8ac9c11b65f4f5ea455c3ece1377f7c9f5e9 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Mon, 6 Dec 2004 20:12:26 +0000 Subject: Use uvm_grow() to account for stack growth, rather than home-grown code or nothing. Inspired by a similar recent change in NetBSD. --- sys/arch/hppa/hppa/trap.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'sys/arch/hppa') 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; } -- cgit v1.2.3