git: 9320b99017d5 - main - hwpstate_intel(4): Debug sysctl: Fix retrieving the pkg-level MSR
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 26 Jun 2026 21:37:46 UTC
The branch main has been updated by olce:
URL: https://cgit.FreeBSD.org/src/commit/?id=9320b99017d598cb7295a1bf21f227aaaefcf9df
commit 9320b99017d598cb7295a1bf21f227aaaefcf9df
Author: Olivier Certner <olce@FreeBSD.org>
AuthorDate: 2026-06-26 13:57:38 +0000
Commit: Olivier Certner <olce@FreeBSD.org>
CommitDate: 2026-06-26 21:36:31 +0000
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
---
sys/x86/cpufreq/hwpstate_intel.c | 3 +--
1 file changed, 1 insertion(+), 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;
}