summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2004-03-29 01:24:13 +0000
committerkensmith <kensmith@FreeBSD.org>2004-03-29 01:24:13 +0000
commit356f4db5a0cb9e06e8fc415122998058785208b4 (patch)
tree38afc7e4183da8b8dd195cf6f60e424f6c549651 /sys
parentf23f565e5eb424f9c127d6ae795d6d9178119dea (diff)
downloadFreeBSD-src-356f4db5a0cb9e06e8fc415122998058785208b4.zip
FreeBSD-src-356f4db5a0cb9e06e8fc415122998058785208b4.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. Reviewed by: marcel Approved by: rwatson (mentor)
Diffstat (limited to 'sys')
-rw-r--r--sys/sparc64/sparc64/vm_machdep.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c
index cb21b73..459aaf6 100644
--- a/sys/sparc64/sparc64/vm_machdep.c
+++ b/sys/sparc64/sparc64/vm_machdep.c
@@ -43,7 +43,6 @@
* $FreeBSD$
*/
-#include "opt_kstack_pages.h"
#include "opt_pmap.h"
#include <sys/param.h>
@@ -158,7 +157,7 @@ cpu_thread_setup(struct thread *td)
{
struct pcb *pcb;
- pcb = (struct pcb *)((td->td_kstack + KSTACK_PAGES * PAGE_SIZE -
+ pcb = (struct pcb *)((td->td_kstack + td->td_kstack_pages * PAGE_SIZE -
sizeof(struct pcb)) & ~0x3fUL);
td->td_frame = (struct trapframe *)pcb - 1;
td->td_pcb = pcb;
@@ -240,8 +239,8 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags)
/* The pcb must be aligned on a 64-byte boundary. */
pcb1 = td1->td_pcb;
- pcb2 = (struct pcb *)((td2->td_kstack + KSTACK_PAGES * PAGE_SIZE -
- sizeof(struct pcb)) & ~0x3fUL);
+ pcb2 = (struct pcb *)((td2->td_kstack + td2->td_kstack_pages *
+ PAGE_SIZE - sizeof(struct pcb)) & ~0x3fUL);
td2->td_pcb = pcb2;
/*
OpenPOWER on IntegriCloud