svn commit: r349304 - stable/12/sys/amd64/amd64

Konstantin Belousov kib at FreeBSD.org
Sun Jun 23 11:09:09 UTC 2019


Author: kib
Date: Sun Jun 23 11:09:08 2019
New Revision: 349304
URL: https://svnweb.freebsd.org/changeset/base/349304

Log:
  MFC r348802:
  Remove lazy FPU switch support from amd64.
  
  For the merge, the hw.lazy_fpu_switch sysctl was kept but made read-only
  with the value of 0.

Modified:
  stable/12/sys/amd64/amd64/fpu.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/amd64/amd64/fpu.c
==============================================================================
--- stable/12/sys/amd64/amd64/fpu.c	Sun Jun 23 11:04:34 2019	(r349303)
+++ stable/12/sys/amd64/amd64/fpu.c	Sun Jun 23 11:09:08 2019	(r349304)
@@ -155,7 +155,7 @@ SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_
     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,
+SYSCTL_INT(_hw, OID_AUTO, lazy_fpu_switch, CTLFLAG_RD,
     &lazy_fpu_switch, 0,
     "Lazily load FPU context after context switch");
 
@@ -269,7 +269,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 +773,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) {


More information about the svn-src-stable mailing list