提交 3f1524f9 编写于 作者: N Nathan Fontenot 提交者: Zheng Zengkai

cpupower: Remove unused pscur variable.

mainline inclusion
from mainline-5.12-rc1-dontuse
commit 1421de79
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4QQWF

--------------------------------

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: NNathan Fontenot <nathan.fontenot@amd.com>
Reviewed-by: NRobert Richter <rrichter@amd.com>
Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Nqinyu <qinyu16@huawei.com>
Reviewed-by: NChao Liu <liuchao173@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 c2789d32
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册