summaryrefslogtreecommitdiffstats
path: root/tools/power
diff options
context:
space:
mode:
authorNathan Fontenot <nathan.fontenot@amd.com>2021-01-25 11:35:10 -0600
committerShuah Khan <skhan@linuxfoundation.org>2021-01-26 09:40:21 -0700
commit1421de7919cd082bad692626937f055f367586ba (patch)
treee8ac0b934bd21f8e5e5861534a1f8fc9706cab0b /tools/power
parenta0255a76bf3a78d322adfe4eb4e73eb83998f61a (diff)
downloadlinux-1421de7919cd082bad692626937f055f367586ba.tar.bz2
cpupower: Remove unused pscur variable.
The pscur variable is set but not uused, just remove it. This may have previsously been set to validate the MSR_AMD_PSTATE_STATUS MSR. With the addition of the CPUPOWER_CAP_AMD_HW_PSTATE cap flag this is no longer needed since the cpuid bit to enable this cap flag also validates that the MSR_AMD_PSTATE_STATUS MSR is present. Signed-off-by: Nathan Fontenot <nathan.fontenot@amd.com> Reviewed-by: Robert Richter <rrichter@amd.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/power')
-rw-r--r--tools/power/cpupower/utils/helpers/amd.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/tools/power/cpupower/utils/helpers/amd.c b/tools/power/cpupower/utils/helpers/amd.c
index 8b69c7ff639a..fc2ac1e6bfb2 100644
--- a/tools/power/cpupower/utils/helpers/amd.c
+++ b/tools/power/cpupower/utils/helpers/amd.c
@@ -90,7 +90,7 @@ static int get_cof(int family, union core_pstate pstate)
int decode_pstates(unsigned int cpu, unsigned int cpu_family,
int boost_states, unsigned long *pstates, int *no)
{
- int i, psmax, pscur;
+ int i, psmax;
union core_pstate pstate;
unsigned long long val;
@@ -104,13 +104,6 @@ int decode_pstates(unsigned int cpu, unsigned int cpu_family,
return -1;
psmax = (val >> 4) & 0x7;
-
- if (read_msr(cpu, MSR_AMD_PSTATE_STATUS, &val))
- return -1;
-
- pscur = val & 0x7;
-
- pscur += boost_states;
psmax += boost_states;
for (i = 0; i <= psmax; i++) {
if (i >= MAX_HW_PSTATES) {