diff options
author | Chen Yu <yu.c.chen@intel.com> | 2015-12-13 08:09:31 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2016-03-13 04:22:57 -0400 |
commit | 685b535b2cdb9cdf354321f8af9ed17dcf19d19f (patch) | |
tree | 3d6fd0eff20adeea47c853d6b915e40a3917d82b | |
parent | 6c34f160df82ae07bfff5b4c51f50622e9c2759e (diff) |
tools/power turbostat: bugfix: TDP MSRs print bits fixing
MSR_CONFIG_TDP_NOMINAL:
should print all 8 bits of base_ratio (bit 0:7) 0xFF
MSR_CONFIG_TDP_LEVEL_1:
should print all 15 bits of PKG_MIN_PWR_LVL1 (bit 48:62) 0x7FFF
should print all 15 bits of PKG_MAX_PWR_LVL1 (bit 32:46) 0x7FFF
should print all 8 bits of LVL1_RATIO (bit 16:23) 0xFF
should print all 15 bits of PKG_TDP_LVL1 (bit 0:14) 0x7FFF
And the same modification to MSR_CONFIG_TDP_LEVEL_2.
MSR_TURBO_ACTIVATION_RATIO:
should print all 8 bits of MAX_NON_TURBO_RATIO (bit 0:7) 0xFF
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | tools/power/x86/turbostat/turbostat.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c index a551630a82b6..ee1551b6fa01 100644 --- a/tools/power/x86/turbostat/turbostat.c +++ b/tools/power/x86/turbostat/turbostat.c | |||
@@ -1544,25 +1544,25 @@ dump_config_tdp(void) | |||
1544 | 1544 | ||
1545 | get_msr(base_cpu, MSR_CONFIG_TDP_NOMINAL, &msr); | 1545 | get_msr(base_cpu, MSR_CONFIG_TDP_NOMINAL, &msr); |
1546 | fprintf(outf, "cpu%d: MSR_CONFIG_TDP_NOMINAL: 0x%08llx", base_cpu, msr); | 1546 | fprintf(outf, "cpu%d: MSR_CONFIG_TDP_NOMINAL: 0x%08llx", base_cpu, msr); |
1547 | fprintf(outf, " (base_ratio=%d)\n", (unsigned int)msr & 0xEF); | 1547 | fprintf(outf, " (base_ratio=%d)\n", (unsigned int)msr & 0xFF); |
1548 | 1548 | ||
1549 | get_msr(base_cpu, MSR_CONFIG_TDP_LEVEL_1, &msr); | 1549 | get_msr(base_cpu, MSR_CONFIG_TDP_LEVEL_1, &msr); |
1550 | fprintf(outf, "cpu%d: MSR_CONFIG_TDP_LEVEL_1: 0x%08llx (", base_cpu, msr); | 1550 | fprintf(outf, "cpu%d: MSR_CONFIG_TDP_LEVEL_1: 0x%08llx (", base_cpu, msr); |
1551 | if (msr) { | 1551 | if (msr) { |
1552 | fprintf(outf, "PKG_MIN_PWR_LVL1=%d ", (unsigned int)(msr >> 48) & 0xEFFF); | 1552 | fprintf(outf, "PKG_MIN_PWR_LVL1=%d ", (unsigned int)(msr >> 48) & 0x7FFF); |
1553 | fprintf(outf, "PKG_MAX_PWR_LVL1=%d ", (unsigned int)(msr >> 32) & 0xEFFF); | 1553 | fprintf(outf, "PKG_MAX_PWR_LVL1=%d ", (unsigned int)(msr >> 32) & 0x7FFF); |
1554 | fprintf(outf, "LVL1_RATIO=%d ", (unsigned int)(msr >> 16) & 0xEF); | 1554 | fprintf(outf, "LVL1_RATIO=%d ", (unsigned int)(msr >> 16) & 0xFF); |
1555 | fprintf(outf, "PKG_TDP_LVL1=%d", (unsigned int)(msr) & 0xEFFF); | 1555 | fprintf(outf, "PKG_TDP_LVL1=%d", (unsigned int)(msr) & 0x7FFF); |
1556 | } | 1556 | } |
1557 | fprintf(outf, ")\n"); | 1557 | fprintf(outf, ")\n"); |
1558 | 1558 | ||
1559 | get_msr(base_cpu, MSR_CONFIG_TDP_LEVEL_2, &msr); | 1559 | get_msr(base_cpu, MSR_CONFIG_TDP_LEVEL_2, &msr); |
1560 | fprintf(outf, "cpu%d: MSR_CONFIG_TDP_LEVEL_2: 0x%08llx (", base_cpu, msr); | 1560 | fprintf(outf, "cpu%d: MSR_CONFIG_TDP_LEVEL_2: 0x%08llx (", base_cpu, msr); |
1561 | if (msr) { | 1561 | if (msr) { |
1562 | fprintf(outf, "PKG_MIN_PWR_LVL2=%d ", (unsigned int)(msr >> 48) & 0xEFFF); | 1562 | fprintf(outf, "PKG_MIN_PWR_LVL2=%d ", (unsigned int)(msr >> 48) & 0x7FFF); |
1563 | fprintf(outf, "PKG_MAX_PWR_LVL2=%d ", (unsigned int)(msr >> 32) & 0xEFFF); | 1563 | fprintf(outf, "PKG_MAX_PWR_LVL2=%d ", (unsigned int)(msr >> 32) & 0x7FFF); |
1564 | fprintf(outf, "LVL2_RATIO=%d ", (unsigned int)(msr >> 16) & 0xEF); | 1564 | fprintf(outf, "LVL2_RATIO=%d ", (unsigned int)(msr >> 16) & 0xFF); |
1565 | fprintf(outf, "PKG_TDP_LVL2=%d", (unsigned int)(msr) & 0xEFFF); | 1565 | fprintf(outf, "PKG_TDP_LVL2=%d", (unsigned int)(msr) & 0x7FFF); |
1566 | } | 1566 | } |
1567 | fprintf(outf, ")\n"); | 1567 | fprintf(outf, ")\n"); |
1568 | 1568 | ||
@@ -1575,7 +1575,7 @@ dump_config_tdp(void) | |||
1575 | 1575 | ||
1576 | get_msr(base_cpu, MSR_TURBO_ACTIVATION_RATIO, &msr); | 1576 | get_msr(base_cpu, MSR_TURBO_ACTIVATION_RATIO, &msr); |
1577 | fprintf(outf, "cpu%d: MSR_TURBO_ACTIVATION_RATIO: 0x%08llx (", base_cpu, msr); | 1577 | fprintf(outf, "cpu%d: MSR_TURBO_ACTIVATION_RATIO: 0x%08llx (", base_cpu, msr); |
1578 | fprintf(outf, "MAX_NON_TURBO_RATIO=%d", (unsigned int)(msr) & 0x7F); | 1578 | fprintf(outf, "MAX_NON_TURBO_RATIO=%d", (unsigned int)(msr) & 0xFF); |
1579 | fprintf(outf, " lock=%d", (unsigned int)(msr >> 31) & 1); | 1579 | fprintf(outf, " lock=%d", (unsigned int)(msr >> 31) & 1); |
1580 | fprintf(outf, ")\n"); | 1580 | fprintf(outf, ")\n"); |
1581 | } | 1581 | } |