diff options
author | kib <kib@FreeBSD.org> | 2016-03-16 16:42:01 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-03-16 16:42:01 +0000 |
commit | 6f44a5bccb40d37e6a4af7d8e341bde6c55ff8dc (patch) | |
tree | c1830460bfe301ee1ecd9b37dfcfb19acb0a36ca /sys/i386 | |
parent | b7b28dc6d80f46c504ca926799c38c8b684090a3 (diff) | |
download | FreeBSD-src-6f44a5bccb40d37e6a4af7d8e341bde6c55ff8dc.zip FreeBSD-src-6f44a5bccb40d37e6a4af7d8e341bde6c55ff8dc.tar.gz |
MFC r296908:
Force the desired alignment of the user save area.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 7b73a2d..a633f72 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -159,8 +159,8 @@ get_pcb_user_save_td(struct thread *td) { vm_offset_t p; p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - cpu_max_ext_state_size; - KASSERT((p % 64) == 0, ("Unaligned pcb_user_save area")); + roundup2(cpu_max_ext_state_size, XSAVE_AREA_ALIGN); + KASSERT((p % XSAVE_AREA_ALIGN) == 0, ("Unaligned pcb_user_save area")); return ((union savefpu *)p); } @@ -179,7 +179,8 @@ get_pcb_td(struct thread *td) vm_offset_t p; p = td->td_kstack + td->td_kstack_pages * PAGE_SIZE - - cpu_max_ext_state_size - sizeof(struct pcb); + roundup2(cpu_max_ext_state_size, XSAVE_AREA_ALIGN) - + sizeof(struct pcb); return ((struct pcb *)p); } |