diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 77b5095708e9..89a26095b979 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" -#include "opt_kstack_pages.h" #include "opt_cpu.h" #include diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 4c3fa5d5252e..feccc01febae 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -44,7 +44,6 @@ __FBSDID("$FreeBSD$"); #include "opt_isa.h" -#include "opt_kstack_pages.h" #include "opt_npx.h" #ifdef PC98 #include "opt_pc98.h" diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index d174bc9b4003..9935390e35cf 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -67,8 +67,6 @@ * rights to redistribute these changes. */ -#include "opt_kstack_pages.h" - #include #include #include @@ -139,8 +137,8 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) p1 = td1->td_proc; - pcb = (struct pcb *)((td2->td_kstack + KSTACK_PAGES * PAGE_SIZE - - sizeof(struct pcb)) & ~0x2fU); + pcb = (struct pcb *)((td2->td_kstack + + td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fU); td2->td_pcb = pcb; /* Copy the pcb */ @@ -357,7 +355,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 + td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fU); td->td_pcb = pcb; td->td_frame = (struct trapframe *)pcb - 1; diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index d174bc9b4003..9935390e35cf 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -67,8 +67,6 @@ * rights to redistribute these changes. */ -#include "opt_kstack_pages.h" - #include #include #include @@ -139,8 +137,8 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) p1 = td1->td_proc; - pcb = (struct pcb *)((td2->td_kstack + KSTACK_PAGES * PAGE_SIZE - - sizeof(struct pcb)) & ~0x2fU); + pcb = (struct pcb *)((td2->td_kstack + + td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fU); td2->td_pcb = pcb; /* Copy the pcb */ @@ -357,7 +355,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 + td2->td_kstack_pages * PAGE_SIZE - sizeof(struct pcb)) & ~0x2fU); td->td_pcb = pcb; td->td_frame = (struct trapframe *)pcb - 1;