aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhenlei Huang <zlei@FreeBSD.org>2023-10-09 10:30:21 +0000
committerZhenlei Huang <zlei@FreeBSD.org>2023-10-09 10:30:21 +0000
commit149b9c234b00ff902718e1f76c809609a5465198 (patch)
tree95ee647516dfadc1e1b36e668ee92a29f3a28759
parent95c01e9b329406699e89907167b5c3c9effbcbca (diff)
x86: Add sysctl flag CTLFLAG_TUN to loader tunables
The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. machdep.idle 2. machdep.idle_apl31 No functional change intended. Reviewed by: kib, imp MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42113
-rw-r--r--sys/x86/x86/cpu_machdep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c
index 868e6e2bc365..6062b4e85e16 100644
--- a/sys/x86/x86/cpu_machdep.c
+++ b/sys/x86/x86/cpu_machdep.c
@@ -688,7 +688,7 @@ out:
}
static int cpu_idle_apl31_workaround;
-SYSCTL_INT(_machdep, OID_AUTO, idle_apl31, CTLFLAG_RW,
+SYSCTL_INT(_machdep, OID_AUTO, idle_apl31, CTLFLAG_RWTUN | CTLFLAG_NOFETCH,
&cpu_idle_apl31_workaround, 0,
"Apollo Lake APL31 MWAIT bug workaround");
@@ -802,7 +802,7 @@ cpu_idle_sysctl(SYSCTL_HANDLER_ARGS)
}
SYSCTL_PROC(_machdep, OID_AUTO, idle,
- CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
+ CTLTYPE_STRING | CTLFLAG_RWTUN | CTLFLAG_NOFETCH | CTLFLAG_MPSAFE,
0, 0, cpu_idle_sysctl, "A",
"currently selected idle function");