]> git.baikalelectronics.ru Git - kernel.git/commit
perf/x86/amd/lbr: Detect LbrExtV2 support
authorSandipan Das <sandipan.das@amd.com>
Thu, 11 Aug 2022 12:29:53 +0000 (17:59 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 26 Aug 2022 22:05:43 +0000 (00:05 +0200)
commit04715a5ef633c875e9421b72069e6c2993325420
treef23cd920b092433d819d3fa160d540cfd0129f18
parent7b3991a35b1e96e848d83fcdb7c85812e6980be5
perf/x86/amd/lbr: Detect LbrExtV2 support

AMD Last Branch Record Extension Version 2 (LbrExtV2) is driven by Core PMC
overflows. It records recently taken branches up to the moment when the PMC
overflow occurs.

Detect the feature during PMU initialization and set the branch stack depth
using CPUID leaf 0x80000022 EBX.

Signed-off-by: Sandipan Das <sandipan.das@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/fc6e45378ada258f1bab79b0de6e05c393a8f1dd.1660211399.git.sandipan.das@amd.com
arch/x86/events/amd/Makefile
arch/x86/events/amd/core.c
arch/x86/events/amd/lbr.c [new file with mode: 0644]
arch/x86/events/perf_event.h
arch/x86/include/asm/perf_event.h