perf/x86/amd/uncore: Use rdmsr if rdpmc is unavailable
authorSandipan Das <sandipan.das@amd.com>
Thu, 5 Oct 2023 05:23:13 +0000 (10:53 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 9 Oct 2023 14:12:24 +0000 (16:12 +0200)
commit7ef0343855dc23a979a53b3143540f93f3e5bef8
tree5990c6b7081bc48851695b575801dbd2354a5dd6
parent07888daa056e809de0b6b234116b575c11f9f99d
perf/x86/amd/uncore: Use rdmsr if rdpmc is unavailable

Not all uncore PMUs may support the use of the RDPMC instruction for
reading counters. In such cases, read the count from the corresponding
PERF_CTR register using the RDMSR instruction.

Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/e9d994e32a3fcb39fa59fcf43ab4260d11aba097.1696425185.git.sandipan.das@amd.com
arch/x86/events/amd/uncore.c