svn commit: r315973 - head/sys/arm/arm

Michal Meloun mmel at FreeBSD.org
Sun Mar 26 08:36:22 UTC 2017


Author: mmel
Date: Sun Mar 26 08:36:20 2017
New Revision: 315973
URL: https://svnweb.freebsd.org/changeset/base/315973

Log:
  Save VFP state on fork().
  Update the copy of VFP state in PCB before it is cloned for new process.
  
  MFC after:	2 weeks

Modified:
  head/sys/arm/arm/vm_machdep.c

Modified: head/sys/arm/arm/vm_machdep.c
==============================================================================
--- head/sys/arm/arm/vm_machdep.c	Sun Mar 26 01:10:59 2017	(r315972)
+++ head/sys/arm/arm/vm_machdep.c	Sun Mar 26 08:36:20 2017	(r315973)
@@ -111,6 +111,14 @@ cpu_fork(register struct thread *td1, re
 	pmap_use_minicache(td2->td_kstack, td2->td_kstack_pages * PAGE_SIZE);
 #endif
 #endif
+#ifdef VFP
+	/* Store actual state of VFP */
+	if (curthread == td1) {
+		critical_enter();
+		vfp_store(&td1->td_pcb->pcb_vfpstate, false);
+		critical_exit();
+	}
+#endif
 	td2->td_pcb = pcb2;
 
 	/* Clone td1's pcb */


More information about the svn-src-head mailing list