From 4dc25d44520f3eacfb7d85a2ce54f3e33435ac12 Mon Sep 17 00:00:00 2001 From: Justin Hibbits Date: Fri, 10 Jan 2020 03:16:40 +0000 Subject: [PATCH] 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. --- sys/powerpc/powerpc/cpu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/powerpc/powerpc/cpu.c b/sys/powerpc/powerpc/cpu.c index 3bab370554cc..b61ad91cad14 100644 --- a/sys/powerpc/powerpc/cpu.c +++ b/sys/powerpc/powerpc/cpu.c @@ -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"); /*