aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-06-26 13:57:38 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-06-26 21:36:31 +0000
commit9320b99017d598cb7295a1bf21f227aaaefcf9df (patch)
tree2fd194c14545a77caa807bb1664f99d4b33a8f36
parent9209e04d76c577863210dbc9faa94d4dd7498af6 (diff)
hwpstate_intel(4): Debug sysctl: Fix retrieving the pkg-level MSR
IA32_HWP_REQUEST_PACKAGE_CONTROL is never set in 'sc->req'. Just discriminate on 'hwp_pkg_ctrl', which indicates the hardware capability as indicated by CPUID. Fixes: 29b8220b179b ("hwpstate_intel: Use ipi instead of thread_lock + sched_bind") MFC after: 2 weeks Event: Halifax Hackathon 202606 Location: Dalhousie CS Faculty building Sponsored by: The FreeBSD Foundation
-rw-r--r--sys/x86/cpufreq/hwpstate_intel.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/x86/cpufreq/hwpstate_intel.c b/sys/x86/cpufreq/hwpstate_intel.c
index d67e83b33af7..71f490a00bdc 100644
--- a/sys/x86/cpufreq/hwpstate_intel.c
+++ b/sys/x86/cpufreq/hwpstate_intel.c
@@ -167,8 +167,7 @@ get_cppc_regs_cb(void *args)
if (rdmsr_safe(MSR_IA32_HWP_REQUEST, &data->request))
data->res |= HWP_ERROR_CPPC_REQUEST;
- if (data->sc->hwp_pkg_ctrl &&
- (data->request & IA32_HWP_REQUEST_PACKAGE_CONTROL)) {
+ if (data->sc->hwp_pkg_ctrl) {
if (rdmsr_safe(MSR_IA32_HWP_REQUEST_PKG, &data->request_pkg))
data->res |= HWP_ERROR_CPPC_REQUEST_PKG;
}