From 4b7738dba1fe295270f7b0ce61b79c90363bfda3 Mon Sep 17 00:00:00 2001 From: julian Date: Tue, 26 Jan 1999 02:49:52 +0000 Subject: Mostly remove the VM_STACK OPTION. This changes the definitions of a few items so that structures are the same whether or not the option itself is enabled. This allows people to enable and disable the option without recompilng the world. As the author says: |I ran into a problem pulling out the VM_STACK option. I was aware of this |when I first did the work, but then forgot about it. The VM_STACK stuff |has some code changes in the i386 branch. There need to be corresponding |changes in the alpha branch before it can come out completely. what is done: | |1) Pull the VM_STACK option out of the header files it appears in. This |really shouldn't affect anything that executes with or without the rest |of the VM_STACK patches. The vm_map_entry will then always have one |extra element (avail_ssize). It just won't be used if the VM_STACK |option is not turned on. | |I've also pulled the option out of vm_map.c. This shouldn't harm anything, |since the routines that are enabled as a result are not called unless |the VM_STACK option is enabled elsewhere. | |2) Add what appears to be appropriate code the the alpha branch, still |protected behind the VM_STACK switch. I don't have an alpha machine, |so we would need to get some testers with alpha machines to try it out. | |Once there is some testing, we can consider making the change permanent |for both i386 and alpha. | [..] | |Once the alpha code is adequately tested, we can pull VM_STACK out |everywhere. | Submitted by: "Richard Seaman, Jr." --- sys/powerpc/aim/vm_machdep.c | 19 ++++++++++++++++++- sys/powerpc/powerpc/vm_machdep.c | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) (limited to 'sys/powerpc') diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index 592a089..ed102b1 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/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.6 1998/12/16 15:21:50 bde Exp $ + * $Id: vm_machdep.c,v 1.7 1998/12/30 10:38:58 dfr Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -365,6 +365,7 @@ 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. @@ -417,6 +418,22 @@ grow(p, sp) return (1); } +#else +int +grow_stack(p, sp) + struct proc *p; + size_t sp; +{ + int rv; + + rv = vm_map_growstack (p, sp); + if (rv != KERN_SUCCESS) + return (0); + + return (1); +} +#endif + static int cnt_prezero; diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 592a089..ed102b1 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/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.6 1998/12/16 15:21:50 bde Exp $ + * $Id: vm_machdep.c,v 1.7 1998/12/30 10:38:58 dfr Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -365,6 +365,7 @@ 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. @@ -417,6 +418,22 @@ grow(p, sp) return (1); } +#else +int +grow_stack(p, sp) + struct proc *p; + size_t sp; +{ + int rv; + + rv = vm_map_growstack (p, sp); + if (rv != KERN_SUCCESS) + return (0); + + return (1); +} +#endif + static int cnt_prezero; -- cgit v1.1