mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
tools/power/turbostat: Fix a knl bug
MSR_KNL_CORE_C6_RESIDENCY should be evaluated only if 1. this is KNL platform AND 2. need to get C6 residency or need to calculate C1 residency Fix the broken logic introduced by commit1e9042b9c8
("tools/power turbostat: Fix CPU%C1 display value"). Fixes:1e9042b9c8
("tools/power turbostat: Fix CPU%C1 display value") Signed-off-by: Zhang Rui <rui.zhang@intel.com> Reviewed-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
4d1827485a
commit
137f01b352
@ -2180,7 +2180,7 @@ retry:
|
||||
if ((DO_BIC(BIC_CPU_c6) || soft_c1_residency_display(BIC_CPU_c6)) && !do_knl_cstates) {
|
||||
if (get_msr(cpu, MSR_CORE_C6_RESIDENCY, &c->c6))
|
||||
return -7;
|
||||
} else if (do_knl_cstates || soft_c1_residency_display(BIC_CPU_c6)) {
|
||||
} else if (do_knl_cstates && soft_c1_residency_display(BIC_CPU_c6)) {
|
||||
if (get_msr(cpu, MSR_KNL_CORE_C6_RESIDENCY, &c->c6))
|
||||
return -7;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user