summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-04-19 14:14:14 +0000
committerpeter <peter@FreeBSD.org>1999-04-19 14:14:14 +0000
commita74bdeb7d109443c9e5e0c792c2259175cb4174b (patch)
tree2acafa9158dea8a7e748a4a8903244b94ab9b1fa /sys/alpha
parent2fc2e936d3183fa2f055ea3ee01fe2cef1596055 (diff)
downloadFreeBSD-src-a74bdeb7d109443c9e5e0c792c2259175cb4174b.zip
FreeBSD-src-a74bdeb7d109443c9e5e0c792c2259175cb4174b.tar.gz
unifdef -DVM_STACK - it's been on for a while for x86 and was checked
and appeared to be working for the Alpha some time ago.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/machdep.c11
-rw-r--r--sys/alpha/alpha/trap.c13
-rw-r--r--sys/alpha/alpha/vm_machdep.c57
-rw-r--r--sys/alpha/linux/linux_sysvec.c6
4 files changed, 4 insertions, 83 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index be36a26..9684309 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: machdep.c,v 1.36 1999/04/11 12:48:15 simokawa Exp $
+ * $Id: machdep.c,v 1.37 1999/04/13 15:42:34 simokawa Exp $
*/
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -1300,14 +1300,6 @@ sendsig(sig_t catcher, int sig, int mask, u_long code)
psp->ps_sigstk.ss_flags |= SS_ONSTACK;
} else
scp = (struct sigcontext *)(alpha_pal_rdusp() - rndfsize);
-#ifndef VM_STACK
- if ((u_long)scp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
-#if defined(UVM)
- (void)uvm_grow(p, (u_long)scp);
-#else
- (void)grow(p, (u_long)scp);
-#endif
-#else
/* Note: uvm_grow doesn't seem to be defined anywhere, so we don't
* know how to implement it for the VM_STACK case. Also, we would
* think that it would be wise to test for success of grow_stack,
@@ -1315,7 +1307,6 @@ sendsig(sig_t catcher, int sig, int mask, u_long code)
* non VM_STACK case.
*/
(void)grow_stack(p, (u_long)scp);
-#endif
#ifdef DEBUG
if ((sigdebug & SDB_KSTACK) && p->p_pid == sigpid)
printf("sendsig(%d): sig %d ssp %p usp %p\n", p->p_pid,
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c
index 2a91e7d..187b6a3 100644
--- a/sys/alpha/alpha/trap.c
+++ b/sys/alpha/alpha/trap.c
@@ -1,4 +1,4 @@
-/* $Id: trap.c,v 1.10 1998/12/30 10:38:58 dfr Exp $ */
+/* $Id: trap.c,v 1.11 1999/01/26 02:49:51 julian Exp $ */
/* $NetBSD: trap.c,v 1.31 1998/03/26 02:21:46 thorpej Exp $ */
/*
@@ -418,16 +418,6 @@ trap(a0, a1, a2, entry, framep)
/*
* Grow the stack if necessary
*/
-#ifndef VM_STACK
- if ((caddr_t)va > vm->vm_maxsaddr
- && va < USRSTACK) {
- if (!grow(p, va)) {
- rv = KERN_FAILURE;
- --p->p_lock;
- goto nogo;
- }
- }
-#else
/* grow_stack returns false only if va falls into
* a growable stack region and the stack growth
* fails. It returns true if va was not within
@@ -439,7 +429,6 @@ trap(a0, a1, a2, entry, framep)
--p->p_lock;
goto nogo;
}
-#endif
/* Fault in the user page: */
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index 658f730..37fce54 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -38,7 +38,7 @@
*
* from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91
* Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$
- * $Id: vm_machdep.c,v 1.10 1999/02/08 00:47:32 dillon Exp $
+ * $Id: vm_machdep.c,v 1.11 1999/02/08 02:42:12 dillon Exp $
*/
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -365,60 +365,6 @@ cpu_reset()
prom_halt(0);
}
-#ifndef VM_STACK
-/*
- * Grow the user stack to allow for 'sp'. This version grows the stack in
- * chunks of SGROWSIZ.
- */
-int
-grow(p, sp)
- struct proc *p;
- size_t sp;
-{
- unsigned int nss;
- caddr_t v;
- struct vmspace *vm = p->p_vmspace;
-
- if ((caddr_t)sp <= vm->vm_maxsaddr || sp >= USRSTACK)
- return (1);
-
- nss = roundup(USRSTACK - sp, PAGE_SIZE);
-
- if (nss > p->p_rlimit[RLIMIT_STACK].rlim_cur)
- return (0);
-
- if (vm->vm_ssize && roundup(vm->vm_ssize << PAGE_SHIFT,
- SGROWSIZ) < nss) {
- int grow_amount;
- /*
- * If necessary, grow the VM that the stack occupies
- * to allow for the rlimit. This allows us to not have
- * to allocate all of the VM up-front in execve (which
- * is expensive).
- * Grow the VM by the amount requested rounded up to
- * the nearest SGROWSIZ to provide for some hysteresis.
- */
- grow_amount = roundup((nss - (vm->vm_ssize << PAGE_SHIFT)), SGROWSIZ);
- v = (char *)USRSTACK - roundup(vm->vm_ssize << PAGE_SHIFT,
- SGROWSIZ) - grow_amount;
- /*
- * If there isn't enough room to extend by SGROWSIZ, then
- * just extend to the maximum size
- */
- if (v < vm->vm_maxsaddr) {
- v = vm->vm_maxsaddr;
- grow_amount = MAXSSIZ - (vm->vm_ssize << PAGE_SHIFT);
- }
- if ((grow_amount == 0) || (vm_map_find(&vm->vm_map, NULL, 0, (vm_offset_t *)&v,
- grow_amount, FALSE, VM_PROT_ALL, VM_PROT_ALL, 0) != KERN_SUCCESS)) {
- return (0);
- }
- vm->vm_ssize += grow_amount >> PAGE_SHIFT;
- }
-
- return (1);
-}
-#else
int
grow_stack(p, sp)
struct proc *p;
@@ -432,7 +378,6 @@ grow_stack(p, sp)
return (1);
}
-#endif
static int cnt_prezero;
diff --git a/sys/alpha/linux/linux_sysvec.c b/sys/alpha/linux/linux_sysvec.c
index 744719c..d3a2f71 100644
--- a/sys/alpha/linux/linux_sysvec.c
+++ b/sys/alpha/linux/linux_sysvec.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_sysvec.c,v 1.44 1999/01/17 20:36:14 peter Exp $
+ * $Id: linux_sysvec.c,v 1.45 1999/02/04 21:20:13 newton Exp $
*/
/* XXX we use functions that might not exist. */
@@ -217,11 +217,7 @@ linux_sendsig(sig_t catcher, int sig, int mask, u_long code)
* and the stack can not be grown. useracc will return FALSE
* if access is denied.
*/
-#ifdef VM_STACK
if ((grow_stack (p, (int)fp) == FALSE) ||
-#else
- if ((grow(p, (int)fp) == FALSE) ||
-#endif
(useracc((caddr_t)fp, sizeof (struct linux_sigframe), B_WRITE) == FALSE)) {
/*
* Process has trashed its stack; give it an illegal
OpenPOWER on IntegriCloud