Page MenuHomeFreeBSD

D29401.id86216.diff
No OneTemporary

D29401.id86216.diff

Index: sys/arm64/arm64/vfp.c
===================================================================
--- sys/arm64/arm64/vfp.c
+++ 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
Thu, Apr 2, 10:22 AM (14 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30698967
Default Alt Text
D29401.id86216.diff (837 B)

Event Timeline