Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Install the FPU state on the current CPU in...



details:   https://anonhg.NetBSD.org/src/rev/89e5d04d88b3
branches:  trunk
changeset: 323421:89e5d04d88b3
user:      maxv <maxv%NetBSD.org@localhost>
date:      Thu Jun 14 18:00:15 2018 +0000

description:
Install the FPU state on the current CPU in setregs (execve).

diffstat:

 sys/arch/x86/x86/fpu.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r fd7a395ed8d4 -r 89e5d04d88b3 sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c    Thu Jun 14 17:58:22 2018 +0000
+++ b/sys/arch/x86/x86/fpu.c    Thu Jun 14 18:00:15 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.c,v 1.33 2018/06/14 14:36:46 maxv Exp $    */
+/*     $NetBSD: fpu.c,v 1.34 2018/06/14 18:00:15 maxv Exp $    */
 
 /*
  * Copyright (c) 2008 The NetBSD Foundation, Inc.  All
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.33 2018/06/14 14:36:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.34 2018/06/14 18:00:15 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -644,6 +644,14 @@
                fpu_save->sv_87.s87_cw = x87_cw;
        }
        pcb->pcb_fpu_dflt_cw = x87_cw;
+
+       /*
+        * If using eager-switch, install the FPU state on the current
+        * CPU.
+        */
+       if (x86_fpu_eager) {
+               fpu_eagerswitch(NULL, l);
+       }
 }
 
 void



Home | Main Index | Thread Index | Old Index