Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jan 2020 03:16:41 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356591 - head/sys/powerpc/powerpc
Message-ID:  <202001100316.00A3GfIV008214@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Fri Jan 10 03:16:40 2020
New Revision: 356591
URL: https://svnweb.freebsd.org/changeset/base/356591

Log:
  powerpc: Mark cpu_feature-based sysctls as MP_SAFE
  
  hw.floatingpoint and hw.altivec are effectively runtime constants (bits from
  the cpu_feature bitfield), so don't need Giant, or any locking for that
  matter.

Modified:
  head/sys/powerpc/powerpc/cpu.c

Modified: head/sys/powerpc/powerpc/cpu.c
==============================================================================
--- head/sys/powerpc/powerpc/cpu.c	Fri Jan 10 01:24:49 2020	(r356590)
+++ head/sys/powerpc/powerpc/cpu.c	Fri Jan 10 03:16:40 2020	(r356591)
@@ -259,10 +259,10 @@ register_t	lpcr = LPCR_LPES;
 #endif
 
 /* Provide some user-friendly aliases for bits in cpu_features */
-SYSCTL_PROC(_hw, OID_AUTO, floatingpoint, CTLTYPE_INT | CTLFLAG_RD,
-    0, PPC_FEATURE_HAS_FPU, cpu_feature_bit, "I",
-    "Floating point instructions executed in hardware");
-SYSCTL_PROC(_hw, OID_AUTO, altivec, CTLTYPE_INT | CTLFLAG_RD,
+SYSCTL_PROC(_hw, OID_AUTO, floatingpoint,
+    CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, PPC_FEATURE_HAS_FPU,
+    cpu_feature_bit, "I", "Floating point instructions executed in hardware");
+SYSCTL_PROC(_hw, OID_AUTO, altivec, CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE,
     0, PPC_FEATURE_HAS_ALTIVEC, cpu_feature_bit, "I", "CPU supports Altivec");
 
 /*



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