aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-06-25 14:13:56 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-06-26 13:37:45 +0000
commit486ef221b9350644d6ad9a6ad93603d93cef6712 (patch)
tree1a258a4092771bd2f5014e19d245f202d768affc
parent2f7a8222b6a5c7bedf6835eb6a93b35346e50777 (diff)
hwpstate_intel(4): Fix uninitialized variable in debug dump sysctl
It can cause a "cannot read MSR" error to be reported although reading actually worked. Fixes: 29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") Event: Halifax Hackathon 202606 Location: jrm@'s living room Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/x86/cpufreq/hwpstate_intel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/x86/cpufreq/hwpstate_intel.c b/sys/x86/cpufreq/hwpstate_intel.c
index a903ae1521a6..844bebfc7274 100644
--- a/sys/x86/cpufreq/hwpstate_intel.c
+++ b/sys/x86/cpufreq/hwpstate_intel.c
@@ -155,6 +155,8 @@ dump_cppc_request_cb(void *args)
{
struct dump_cppc_request_cb *const data = args;
+ data->err = 0;
+
if (rdmsr_safe(MSR_IA32_PM_ENABLE, &data->enabled))
data->err |= HWP_ERROR_CPPC_ENABLE;
if (rdmsr_safe(MSR_IA32_HWP_CAPABILITIES, &data->caps))