Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jun 2019 11:09:08 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r349304 - stable/12/sys/amd64/amd64
Message-ID:  <201906231109.x5NB98tU098889@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906231109.x5NB98tU098889>