summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2017-01-07 22:37:48 -0500
committerLen Brown <len.brown@intel.com>2017-02-25 16:52:30 -0500
commit71616c8e936a6dd541f0627d7bf4ff09971d8ccb (patch)
tree3dfb3d65bfb969ea99468a2e6e7ab3b6a4c6ec8f /tools
parentcf4cbe5314884c3123fe4ca137e9d750b6e2b8c9 (diff)
tools/power turbostat: decode Baytrail CC6 and MC6 demotion configuration
with --debug, see: cpu0: MSR_CC6_DEMOTION_POLICY_CONFIG: 0x00000000 (DISable-CC6-Demotion) cpu0: MSR_MC6_DEMOTION_POLICY_CONFIG: 0x00000000 (DISable-MC6-Demotion) Note that the hardware default is to enable demotion, and Linux started clearing these registers in 3.17. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/power/x86/turbostat/turbostat.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/power/x86/turbostat/turbostat.c b/tools/power/x86/turbostat/turbostat.c
index fdf0273465fa..1b762f67e3e2 100644
--- a/tools/power/x86/turbostat/turbostat.c
+++ b/tools/power/x86/turbostat/turbostat.c
@@ -3263,6 +3263,27 @@ int has_snb_msrs(unsigned int family, unsigned int model)
3263} 3263}
3264 3264
3265/* 3265/*
3266 * SLV client has supporet for unique MSRs:
3267 *
3268 * MSR_CC6_DEMOTION_POLICY_CONFIG
3269 * MSR_MC6_DEMOTION_POLICY_CONFIG
3270 */
3271
3272int has_slv_msrs(unsigned int family, unsigned int model)
3273{
3274 if (!genuine_intel)
3275 return 0;
3276
3277 switch (model) {
3278 case INTEL_FAM6_ATOM_SILVERMONT1:
3279 case INTEL_FAM6_ATOM_MERRIFIELD:
3280 case INTEL_FAM6_ATOM_MOOREFIELD:
3281 return 1;
3282 }
3283 return 0;
3284}
3285
3286/*
3266 * HSW adds support for additional MSRs: 3287 * HSW adds support for additional MSRs:
3267 * 3288 *
3268 * MSR_PKG_C8_RESIDENCY 0x00000630 3289 * MSR_PKG_C8_RESIDENCY 0x00000630
@@ -3496,6 +3517,24 @@ void decode_misc_pwr_mgmt_msr(void)
3496 msr & (1 << 1) ? "EN" : "DIS", 3517 msr & (1 << 1) ? "EN" : "DIS",
3497 msr & (1 << 8) ? "EN" : "DIS"); 3518 msr & (1 << 8) ? "EN" : "DIS");
3498} 3519}
3520/*
3521 * Decode MSR_CC6_DEMOTION_POLICY_CONFIG, MSR_MC6_DEMOTION_POLICY_CONFIG
3522 *
3523 * This MSRs are present on Silvermont processors,
3524 * Intel Atom processor E3000 series (Baytrail), and friends.
3525 */
3526void decode_c6_demotion_policy_msr(void)
3527{
3528 unsigned long long msr;
3529
3530 if (!get_msr(base_cpu, MSR_CC6_DEMOTION_POLICY_CONFIG, &msr))
3531 fprintf(outf, "cpu%d: MSR_CC6_DEMOTION_POLICY_CONFIG: 0x%08llx (%sable-CC6-Demotion)\n",
3532 base_cpu, msr, msr & (1 << 0) ? "EN" : "DIS");
3533
3534 if (!get_msr(base_cpu, MSR_MC6_DEMOTION_POLICY_CONFIG, &msr))
3535 fprintf(outf, "cpu%d: MSR_MC6_DEMOTION_POLICY_CONFIG: 0x%08llx (%sable-MC6-Demotion)\n",
3536 base_cpu, msr, msr & (1 << 0) ? "EN" : "DIS");
3537}
3499 3538
3500void process_cpuid() 3539void process_cpuid()
3501{ 3540{
@@ -3700,6 +3739,9 @@ void process_cpuid()
3700 if (debug) 3739 if (debug)
3701 decode_misc_pwr_mgmt_msr(); 3740 decode_misc_pwr_mgmt_msr();
3702 3741
3742 if (debug && has_slv_msrs(family, model))
3743 decode_c6_demotion_policy_msr();
3744
3703 rapl_probe(family, model); 3745 rapl_probe(family, model);
3704 perf_limit_reasons_probe(family, model); 3746 perf_limit_reasons_probe(family, model);
3705 3747