From 1d6fb900ed90d1fd6547e2d79da9d0259f450c2c Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 25 Dec 2021 22:24:20 -0500 Subject: [PATCH] x86: Remove CTLFLAG_NEEDGIANT from sysctls. MFC after: 2 weeks --- sys/x86/cpufreq/hwpstate_intel.c | 4 ++-- sys/x86/isa/clock.c | 2 +- sys/x86/x86/cpu_machdep.c | 4 ++-- sys/x86/x86/mp_watchdog.c | 2 +- sys/x86/x86/tsc.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/x86/cpufreq/hwpstate_intel.c b/sys/x86/cpufreq/hwpstate_intel.c index 1ed1056024c1..ae63cc6a6efe 100644 --- a/sys/x86/cpufreq/hwpstate_intel.c +++ b/sys/x86/cpufreq/hwpstate_intel.c @@ -506,12 +506,12 @@ intel_hwpstate_attach(device_t dev) SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_STATIC_CHILDREN(_debug), OID_AUTO, device_get_nameunit(dev), - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_NEEDGIANT, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_SKIP | CTLFLAG_MPSAFE, sc, 0, intel_hwp_dump_sysctl_handler, "A", ""); SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev), SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO, - "epp", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, dev, 0, + "epp", CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_MPSAFE, dev, 0, sysctl_epp_select, "I", "Efficiency/Performance Preference " "(range from 0, most performant, through 100, most efficient)"); diff --git a/sys/x86/isa/clock.c b/sys/x86/isa/clock.c index 513174626892..1178d35979c1 100644 --- a/sys/x86/isa/clock.c +++ b/sys/x86/isa/clock.c @@ -460,7 +460,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", "i8254 timer frequency"); diff --git a/sys/x86/x86/cpu_machdep.c b/sys/x86/x86/cpu_machdep.c index 1924342c8e83..c5026ed8acda 100644 --- a/sys/x86/x86/cpu_machdep.c +++ b/sys/x86/x86/cpu_machdep.c @@ -744,7 +744,7 @@ idle_sysctl_available(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, idle_available, - CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_NEEDGIANT, + CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, 0, idle_sysctl_available, "A", "list of available idle functions"); @@ -791,7 +791,7 @@ cpu_idle_sysctl(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, idle, - CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, cpu_idle_sysctl, "A", "currently selected idle function"); diff --git a/sys/x86/x86/mp_watchdog.c b/sys/x86/x86/mp_watchdog.c index 018139b049c0..0823f90d060e 100644 --- a/sys/x86/x86/mp_watchdog.c +++ b/sys/x86/x86/mp_watchdog.c @@ -150,7 +150,7 @@ sysctl_watchdog(SYSCTL_HANDLER_ARGS) return (0); } SYSCTL_PROC(_debug, OID_AUTO, watchdog, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, sysctl_watchdog, "I", ""); diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c index 693e9a9f2c75..ab8f94c2fc2d 100644 --- a/sys/x86/x86/tsc.c +++ b/sys/x86/x86/tsc.c @@ -852,7 +852,7 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) return (error); } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, - CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_NEEDGIANT, + CTLTYPE_U64 | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, 0, sysctl_machdep_tsc_freq, "QU", "Time Stamp Counter frequency");