Page MenuHomeFreeBSD

D29401.diff
No OneTemporary

D29401.diff

diff --git a/sys/arm64/arm64/vfp.c b/sys/arm64/arm64/vfp.c
--- a/sys/arm64/arm64/vfp.c
+++ b/sys/arm64/arm64/vfp.c
@@ -208,7 +208,15 @@
void
vfp_reset_state(struct thread *td, struct pcb *pcb)
{
+ /* Discard the threads VFP state before resetting it */
critical_enter();
+ vfp_discard(td);
+ critical_exit();
+
+ /*
+ * Clear the thread state. The VFP is disabled and is not the current
+ * VFP thread so we won't change any of these on context switch.
+ */
bzero(&pcb->pcb_fpustate.vfp_regs, sizeof(pcb->pcb_fpustate.vfp_regs));
KASSERT(pcb->pcb_fpusaved == &pcb->pcb_fpustate,
("pcb_fpusaved should point to pcb_fpustate."));
@@ -216,8 +224,6 @@
pcb->pcb_fpustate.vfp_fpsr = 0;
pcb->pcb_vfpcpu = UINT_MAX;
pcb->pcb_fpflags = 0;
- vfp_discard(td);
- critical_exit();
}
void

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 26, 11:57 PM (1 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37336640
Default Alt Text
D29401.diff (804 B)

Event Timeline