diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-09-05 23:00:24 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2013-09-05 23:00:24 +0000 |
commit | 4a4705a68f34369a392b078ab713a3e44a50a512 (patch) | |
tree | 9ce5c350844ef8e9602beff8fd03dd850a035ed2 /sys/powerpc/aim | |
parent | 3186588c66b80d165e89fc5c9baf5c4f797dbbf3 (diff) | |
download | FreeBSD-src-4a4705a68f34369a392b078ab713a3e44a50a512.zip FreeBSD-src-4a4705a68f34369a392b078ab713a3e44a50a512.tar.gz |
Align stacks of kernel threads correctly at 16-byte boundaries rather than
making sure they are all misaligned at +8 bytes. This fixes clang builds
of powerpc64 kernels (aside from a required increase in KSTACK_PAGES which
will come later).
This commit from FreeBSD/powerpc64 with a clang-built kernel.
MFC after: 2 weeks
Diffstat (limited to 'sys/powerpc/aim')
-rw-r--r-- | sys/powerpc/aim/vm_machdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index 2deb4cb..1790ce3 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -187,6 +187,7 @@ cpu_fork(struct thread *td1, struct proc *p2, struct thread *td2, int flags) cf->cf_arg1 = (register_t)tf; pcb->pcb_sp = (register_t)cf; + KASSERT(pcb->pcb_sp % 16 == 0, ("stack misaligned")); #ifdef __powerpc64__ pcb->pcb_lr = ((register_t *)fork_trampoline)[0]; pcb->pcb_toc = ((register_t *)fork_trampoline)[1]; |