tools/power turbostat: Skip printing disabled package C-states
authorLen Brown <len.brown@intel.com>
Tue, 10 Feb 2015 04:39:45 +0000 (23:39 -0500)
committerLen Brown <len.brown@intel.com>
Tue, 10 Feb 2015 04:39:45 +0000 (23:39 -0500)
commitee7e38e3d8805ba6471bddd088fae92ce5ab1ef5
treebfab3cdd9b2ac60aebaddaf9489ba1f8477d3ec7
parenta729617c58529be0be8faa22c5d45748bb0f12e5
tools/power turbostat: Skip printing disabled package C-states

Replaced previously open-coded Package C-state Limit decoding
with table-driven decoding.  In doing so, updated to match January 2015
"Intel(R) 64 and IA-23 Architectures Software Developer's Manual".

In the past, turbostat would print package C-state residency columns
for all package states supported by the model's architecture, even though
a particular SKU may not support them, or they may be disabled by the BIOS.
Now turbostat will skip printing colunns if MSRs indicate that they are not enabled.
eg. many SKUs don't support PC7, and so that column will no longer be printed.

Signed-off-by: Len Brown <len.brown@intel.com>
tools/power/x86/turbostat/turbostat.c