Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
openSUSE:Step:FrontRunner
cpupower.22252
cpupower-Condense-pstate-enabled-bit-checks-in-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File cpupower-Condense-pstate-enabled-bit-checks-in-decode_pstates.patch of Package cpupower.22252
From: Nathan Fontenot <nathan.fontenot@amd.com> Subject: cpupower: Condense pstate enabled bit checks in decode_pstates() References: jsc#SLE-17797 Patch-Mainline: v5.12-rc1-dontuse Git-commit: 56a85eebebdba62ebf6c46bd957949cc6e926aa0 The enabled bit (bit 63) is common for all families so we can remove the multiple enabled checks based on family and have a common check for HW pstate enabled. Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: <trenn@suse.com> diff --git a/utils/helpers/amd.c b/utils/helpers/amd.c index b4731daa6820..216240e2b771 100644 --- a/utils/helpers/amd.c +++ b/utils/helpers/amd.c @@ -113,9 +113,9 @@ int decode_pstates(unsigned int cpu, unsigned int cpu_family, } if (read_msr(cpu, MSR_AMD_PSTATE + i, &pstate.val)) return -1; - if ((cpu_family == 0x17) && (!pstate.pstatedef.en)) - continue; - else if (!pstate.pstate.en) + + /* The enabled bit (bit 63) is common for all families */ + if (!pstate.pstatedef.en) continue; pstates[i] = get_cof(cpu_family, pstate);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor