tools/power turbostat: Fix Core C6 residency on Atom CPUs
authorZhang Rui <rui.zhang@intel.com>
Wed, 21 Apr 2021 14:22:47 +0000 (22:22 +0800)
committerLen Brown <len.brown@intel.com>
Wed, 5 May 2021 00:01:00 +0000 (20:01 -0400)
commit7ab5ff4937a338783d147ec2d8c8714f48a5de79
tree800aa565726cf1499723dd6d38603d46b872c0f1
parentaeb01e6d71ffaf3011ac755c3083cc200ed57cb4
tools/power turbostat: Fix Core C6 residency on Atom CPUs

For Atom CPUs that have core cstate deeper than C6,
MSR_CORE_C6_RESIDENCY actually returns the residency for both CC6 and
deeper Core cstates.
Thus, the real Core C6 residency should be the subtraction of
MSR_CORE_C6_RESIDENCY return value and MSR_CORE_C6_RESIDENCY return value.

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