Skip to content

Commit c315a09

Browse files
committed
tools/power turbostat: Skip pc8, pc9, pc10 columns, if they are disabled
Like we skip PC3 and PC6 columns when the package C-state limit disables them, skip PC8/PC9/CP10 under analogous conditions. Reported-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
1 parent e7af1ed commit c315a09

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tools/power/x86/turbostat/turbostat.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5186,9 +5186,12 @@ void process_cpuid()
51865186
BIC_NOT_PRESENT(BIC_Pkgpc7);
51875187
}
51885188
if (has_c8910_msrs(family, model)) {
5189-
BIC_PRESENT(BIC_Pkgpc8);
5190-
BIC_PRESENT(BIC_Pkgpc9);
5191-
BIC_PRESENT(BIC_Pkgpc10);
5189+
if (pkg_cstate_limit >= PCL__8)
5190+
BIC_PRESENT(BIC_Pkgpc8);
5191+
if (pkg_cstate_limit >= PCL__9)
5192+
BIC_PRESENT(BIC_Pkgpc9);
5193+
if (pkg_cstate_limit >= PCL_10)
5194+
BIC_PRESENT(BIC_Pkgpc10);
51925195
}
51935196
do_irtl_hsw = has_c8910_msrs(family, model);
51945197
if (has_skl_msrs(family, model)) {

0 commit comments

Comments
 (0)