OSDN Git Service

turbostat: fix PC6 displaying on some systems
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 8 Mar 2022 11:41:01 +0000 (13:41 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 8 Mar 2022 13:27:25 +0000 (14:27 +0100)
commita1b6f487cb47ad99ee14730f03c80d3eb4c71e8a
tree76fe92582f10796ae15e32d263b1d3170ffa90a0
parent4a49db7b0abc20634e60e92a4ee423cb18103983
turbostat: fix PC6 displaying on some systems

'MSR_PKG_CST_CONFIG_CONTROL' encodes the deepest allowed package C-state limit,
and turbostat decodes it.

Before this patch: turbostat does not recognize value "3" on Ice Lake Xeon
(ICX) and Sapphire Rapids Xeon (SPR), treats it as "unknown", and does not
display any package C-states in the results table.

After this patch: turbostat recognizes value 3 on ICX and SPR, treats it as
"PC6", and correctly displays package C-states in the results table.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
tools/power/x86/turbostat/turbostat.c