diff options
author | John Baldwin <jhb@FreeBSD.org> | 2021-01-08 22:56:54 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2021-01-19 19:05:48 +0000 |
commit | c6e27f5697c28e188739ea1b4994dc8869dfb6c2 (patch) | |
tree | bfb9a696d7aa2b01463d63098eeb93c4b21af0a2 | |
parent | c7f3aa34cf0eca4de268e8fca19af60db210558a (diff) | |
download | src-c6e27f5697c28e188739ea1b4994dc8869dfb6c2.tar.gz src-c6e27f5697c28e188739ea1b4994dc8869dfb6c2.zip |
arm64: Clear FPU flags in the pcb in cpu_copy_thread().
New threads start off with clean FPU state instead of inheriting state
from the parent thread.
PR: 247945
Sponsored by: Netflix
-rw-r--r-- | sys/arm64/arm64/vm_machdep.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index 37fcf0224521..90d628a7d6ee 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -175,6 +175,7 @@ cpu_copy_thread(struct thread *td, struct thread *td0) td->td_pcb->pcb_x[9] = (uintptr_t)td; td->td_pcb->pcb_lr = (uintptr_t)fork_trampoline; td->td_pcb->pcb_sp = (uintptr_t)td->td_frame; + td->td_pcb->pcb_fpflags &= ~(PCB_FP_STARTED | PCB_FP_KERN | PCB_FP_NOSAVE); td->td_pcb->pcb_fpusaved = &td->td_pcb->pcb_fpustate; td->td_pcb->pcb_vfpcpu = UINT_MAX; |