tools/power turbostat: Clear added counters when in no-msr mode
authorPatryk Wlazlyn <patryk.wlazlyn@linux.intel.com>
Thu, 14 Mar 2024 10:36:55 +0000 (11:36 +0100)
committerLen Brown <len.brown@intel.com>
Tue, 2 Apr 2024 16:50:15 +0000 (12:50 -0400)
commit4a1bb4dad5d16669e841410944e7bc84ef7263fc
treedf1720886a408f6765dc726fa727407e8e691b00
parentaed48c48fa65abdd584e14f7d0273711bc10d223
tools/power turbostat: Clear added counters when in no-msr mode

If user request --no-msr or is not able to access the MSRs,
turbostat should clear all the counters added with --add.
Because MSR access permission checks are done after the cmdline is
parsed, the decision has to be defered up until the transition into
no-msr mode happen.

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