linux-stable/tools/power/x86
Srinivas Pandruvada 1e9042b9c8 tools/power turbostat: Fix CPU%C1 display value
In some case C1% will be wrong value, when platform doesn't have MSR for
C1 residency.

For example:
Core    CPU     CPU%c1
-       -       100.00
0       0       100.00
0       2       100.00
1       1       100.00
1       3       100.00

But adding Busy% will fix this
Core    CPU     Busy%   CPU%c1
-       -       99.77   0.23
0       0       99.77   0.23
0       2       99.77   0.23
1       1       99.77   0.23
1       3       99.77   0.23

This issue can be reproduced on most of the recent systems including
Broadwell, Skylake and later.

This is because if we don't select Busy% or Avg_MHz or Bzy_MHz then
mperf value will not be read from MSR, so it will be 0. But this
is required for C1% calculation when MSR for C1 residency is not present.
Same is true for C3, C6 and C7 column selection.

So add another define DO_BIC_READ(), which doesn't depend on user
column selection and use for mperf, C3, C6 and C7 related counters.
So when there is no platform support for C1 residency counters,
we still read these counters, if the CPU has support and user selected
display of CPU%c1.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2019-08-31 14:48:39 -04:00
..
intel-speed-select tools/power/x86/intel-speed-select: Add .gitignore file 2019-07-12 16:00:38 +03:00
intel_pstate_tracer treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 466 2019-06-19 17:09:10 +02:00
turbostat tools/power turbostat: Fix CPU%C1 display value 2019-08-31 14:48:39 -04:00
x86_energy_perf_policy tools/power x86_energy_perf_policy: Fix argument parsing 2019-08-31 14:48:34 -04:00