summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2004-03-29 02:01:42 +0000
committerkensmith <kensmith@FreeBSD.org>2004-03-29 02:01:42 +0000
commit44a5d7ca166f3e88cdab136c1ce02a56dcb7979f (patch)
treed17bb28844ffe46dcfd8c56703ba13798dfcd469 /sys/alpha
parent3b7dc3c3f751f81ed34018ba4b2ec9b94488dd99 (diff)
downloadFreeBSD-src-44a5d7ca166f3e88cdab136c1ce02a56dcb7979f.zip
FreeBSD-src-44a5d7ca166f3e88cdab136c1ce02a56dcb7979f.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. Note: If anyone's toes got stepped on by me doing this let me know privately please. Approved by: rwatson (mentor)
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/alpha/vm_machdep.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index 26f3365..696dbb5 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -69,8 +69,6 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include "opt_kstack_pages.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -137,7 +135,7 @@ cpu_fork(td1, p2, td2, flags)
p1 = td1->td_proc;
td2->td_pcb = (struct pcb *)
- (td2->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
+ (td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1;
td2->td_md.md_flags = td1->td_md.md_flags & MDTD_FPUSED;
PROC_LOCK(p2);
p2->p_md.md_uac = p1->p_md.md_uac;
@@ -276,7 +274,7 @@ cpu_thread_setup(struct thread *td)
{
td->td_pcb =
- (struct pcb *)(td->td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
+ (struct pcb *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE) - 1;
td->td_md.md_pcbpaddr = (void*)vtophys((vm_offset_t)td->td_pcb);
td->td_frame = (struct trapframe *)((caddr_t)td->td_pcb) - 1;
}
OpenPOWER on IntegriCloud