tools/power/turbostat: Abstract TSC tweak support
authorZhang Rui <rui.zhang@intel.com>
Sun, 27 Aug 2023 02:37:23 +0000 (10:37 +0800)
committerZhang Rui <rui.zhang@intel.com>
Wed, 27 Sep 2023 14:14:19 +0000 (22:14 +0800)
commit485a017c45200ed82518f6cdeea554f77e9a0562
treefabe84d410346c2b3c987b3a4b15ac858967a9da
parentbf1ad57c3f92c551dbfdcecd49797253f55cb7c1
tools/power/turbostat: Abstract TSC tweak support

On some models, the CPU base frequency is different from the TSC
frequency, and the aperf/mperf counters are running at CPU base
frequency instead of TSC frequency.

Abstract support for TSC tweak.

Given that tsc_tweak depends on base_hz, move the code to probe_bclk()
after base_hz is available.

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