summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-03-27 17:44:25 +0000
committermarcel <marcel@FreeBSD.org>2004-03-27 17:44:25 +0000
commitd00cd2e215da68f95aaeba84ada4b94b203c0f98 (patch)
tree501326051abc1d9ffeba6eff6e564ef428b82248
parentd40cec4051543406f85548d31c76e48e4e3c3554 (diff)
downloadFreeBSD-src-d00cd2e215da68f95aaeba84ada4b94b203c0f98.zip
FreeBSD-src-d00cd2e215da68f95aaeba84ada4b94b203c0f98.tar.gz
MFi386: correctly calculate the top-of-stack when a kthread is created
with a larger kernel stack. Remove inclusion of opt_kstack_pages.h now that it's unused.
-rw-r--r--sys/ia64/ia64/vm_machdep.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c
index 027010d..59725b6 100644
--- a/sys/ia64/ia64/vm_machdep.c
+++ b/sys/ia64/ia64/vm_machdep.c
@@ -67,8 +67,6 @@
* rights to redistribute these changes.
*/
-#include "opt_kstack_pages.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -129,7 +127,7 @@ cpu_thread_setup(struct thread *td)
{
intptr_t sp;
- sp = td->td_kstack + KSTACK_PAGES * PAGE_SIZE;
+ sp = td->td_kstack + td->td_kstack_pages * PAGE_SIZE;
sp -= sizeof(struct pcb);
td->td_pcb = (struct pcb *)sp;
sp -= sizeof(struct trapframe);
@@ -257,7 +255,7 @@ cpu_fork(struct thread *td1, struct proc *p2 __unused, struct thread *td2,
* create an image of the parent's stack and backing store and
* adjust where necessary.
*/
- stackp = (char *)(td2->td_kstack + KSTACK_PAGES * PAGE_SIZE);
+ stackp = (char *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE);
stackp -= sizeof(struct pcb);
td2->td_pcb = (struct pcb *)stackp;
OpenPOWER on IntegriCloud