Author: kib
Date: Sat Jun  8 16:03:34 2019
New Revision: 348802
URL: https://svnweb.freebsd.org/changeset/base/348802

Log:
  Remove lazy FPU switch support from amd64.
  
  It is incompatible with some future features.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

Modified:
  head/sys/amd64/amd64/fpu.c

Modified: head/sys/amd64/amd64/fpu.c
==============================================================================
--- head/sys/amd64/amd64/fpu.c  Sat Jun  8 15:24:03 2019        (r348801)
+++ head/sys/amd64/amd64/fpu.c  Sat Jun  8 16:03:34 2019        (r348802)
@@ -154,11 +154,6 @@ static     void    fpu_clean_state(void);
 SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD,
     SYSCTL_NULL_INT_PTR, 1, "Floating point instructions executed in 
hardware");
 
-int lazy_fpu_switch = 0;
-SYSCTL_INT(_hw, OID_AUTO, lazy_fpu_switch, CTLFLAG_RWTUN | CTLFLAG_NOFETCH,
-    &lazy_fpu_switch, 0,
-    "Lazily load FPU context after context switch");
-
 int use_xsave;                 /* non-static for cpu_switch.S */
 uint64_t xsave_mask;           /* the same */
 static uma_zone_t fpu_save_area_zone;
@@ -269,7 +264,6 @@ fpuinit_bsp1(void)
        uint64_t xsave_mask_user;
        bool old_wp;
 
-       TUNABLE_INT_FETCH("hw.lazy_fpu_switch", &lazy_fpu_switch);
        if (!use_xsave)
                return;
        cpuid_count(0xd, 0x0, cp);
@@ -774,8 +768,7 @@ void
 fpu_activate_sw(struct thread *td)
 {
 
-       if (lazy_fpu_switch || (td->td_pflags & TDP_KTHREAD) != 0 ||
-           !PCB_USER_FPU(td->td_pcb)) {
+       if ((td->td_pflags & TDP_KTHREAD) != 0 || !PCB_USER_FPU(td->td_pcb)) {
                PCPU_SET(fpcurthread, NULL);
                start_emulating();
        } else if (PCPU_GET(fpcurthread) != td) {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to