svn commit: r356591 - head/sys/powerpc/powerpc
Justin Hibbits
jhibbits at FreeBSD.org
Fri Jan 10 03:16:41 UTC 2020
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");
/*
More information about the svn-src-all
mailing list