]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tools/power turbostat: Allow execution to continue after perf_l2_init() failure
authorDavid Arcari <darcari@redhat.com>
Thu, 19 Mar 2026 14:03:07 +0000 (10:03 -0400)
committerLen Brown <len.brown@intel.com>
Fri, 10 Apr 2026 13:04:32 +0000 (09:04 -0400)
commitba893caead54745595e29953f0531cf3651610aa
tree553364c7e4fd81d94709bb2106495ac6e65bf20a
parentcdbefe9d4029d4834d404f7ba13a960b38a69e88
tools/power turbostat: Allow execution to continue after perf_l2_init() failure

Currently, if perf_l2_init() fails turbostat exits after issuing the
following error (which was encountered on AlderLake):

turbostat: perf_l2_init(cpu0, 0x0, 0xff24) REFS: Invalid argument

This occurs because perf_l2_init() calls err(). However, the code has been
written in such a manner that it is able to perform cleanup and continue.
Therefore, this issue can be addressed by changing the appropriate calls
to err() to warnx().

Additionally, correct the PMU type arguments passed to the warning strings
in the ecore and lcore blocks so the logs accurately reflect the failing
counter type.

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