Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/x86 export x86_fpu_mxcsr_mask, fpu_area_save and fp...



details:   https://anonhg.NetBSD.org/src/rev/962b859048e7
branches:  trunk
changeset: 836239:962b859048e7
user:      maxv <maxv%NetBSD.org@localhost>
date:      Fri Oct 05 18:51:52 2018 +0000

description:
export x86_fpu_mxcsr_mask, fpu_area_save and fpu_area_restore

diffstat:

 sys/arch/x86/include/cpu.h |   3 ++-
 sys/arch/x86/include/fpu.h |   6 +++++-
 sys/arch/x86/x86/fpu.c     |  11 +++++------
 3 files changed, 12 insertions(+), 8 deletions(-)

diffs (85 lines):

diff -r 00f92c982012 -r 962b859048e7 sys/arch/x86/include/cpu.h
--- a/sys/arch/x86/include/cpu.h        Fri Oct 05 16:21:22 2018 +0000
+++ b/sys/arch/x86/include/cpu.h        Fri Oct 05 18:51:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.97 2018/08/22 01:05:23 msaitoh Exp $ */
+/*     $NetBSD: cpu.h,v 1.98 2018/10/05 18:51:52 maxv Exp $    */
 
 /*
  * Copyright (c) 1990 The Regents of the University of California.
@@ -440,6 +440,7 @@
 #define        FPU_SAVE_XSAVEOPT       3
 extern unsigned int x86_fpu_save_size;
 extern uint64_t x86_xsave_features;
+extern uint32_t x86_fpu_mxcsr_mask;
 extern bool x86_fpu_eager;
 
 extern void (*x86_cpu_idle)(void);
diff -r 00f92c982012 -r 962b859048e7 sys/arch/x86/include/fpu.h
--- a/sys/arch/x86/include/fpu.h        Fri Oct 05 16:21:22 2018 +0000
+++ b/sys/arch/x86/include/fpu.h        Fri Oct 05 18:51:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.h,v 1.12 2018/06/22 06:22:37 maxv Exp $    */
+/*     $NetBSD: fpu.h,v 1.13 2018/10/05 18:51:52 maxv Exp $    */
 
 #ifndef        _X86_FPU_H_
 #define        _X86_FPU_H_
@@ -13,6 +13,10 @@
 
 void fpuinit(struct cpu_info *);
 void fpuinit_mxcsr_mask(void);
+
+void fpu_area_save(void *);
+void fpu_area_restore(void *);
+
 void fpusave_lwp(struct lwp *, bool);
 void fpusave_cpu(bool);
 
diff -r 00f92c982012 -r 962b859048e7 sys/arch/x86/x86/fpu.c
--- a/sys/arch/x86/x86/fpu.c    Fri Oct 05 16:21:22 2018 +0000
+++ b/sys/arch/x86/x86/fpu.c    Fri Oct 05 18:51:52 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fpu.c,v 1.47 2018/09/17 15:53:06 maxv Exp $    */
+/*     $NetBSD: fpu.c,v 1.48 2018/10/05 18:51:52 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.47 2018/09/17 15:53:06 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.48 2018/10/05 18:51:52 maxv Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -126,10 +126,9 @@
 #define stts() HYPERVISOR_fpu_taskswitch(1)
 #endif
 
+uint32_t x86_fpu_mxcsr_mask __read_mostly = 0;
 bool x86_fpu_eager __read_mostly = false;
 
-static uint32_t x86_fpu_mxcsr_mask __read_mostly = 0;
-
 static inline union savefpu *
 lwp_fpuarea(struct lwp *l)
 {
@@ -209,7 +208,7 @@
        fldummy();
 }
 
-static void
+void
 fpu_area_save(void *area)
 {
        clts();
@@ -230,7 +229,7 @@
        }
 }
 
-static void
+void
 fpu_area_restore(void *area)
 {
        clts();



Home | Main Index | Thread Index | Old Index