perf/x86/amd/core: Add generic branch record interfaces
authorSandipan Das <sandipan.das@amd.com>
Thu, 11 Aug 2022 12:29:51 +0000 (17:59 +0530)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 26 Aug 2022 22:05:42 +0000 (00:05 +0200)
commit706460a96fc654e80b6bed1f562b00d2ce9f2f4d
tree8627cb45a62c0ffcf0706bae8fe26c891e94d99e
parent9603aa79e851c652f6da873205c92213af36b24f
perf/x86/amd/core: Add generic branch record interfaces

AMD processors that are capable of recording branches support either Branch
Sampling (BRS) or Last Branch Record (LBR). In preparation for adding Last
Branch Record Extension Version 2 (LbrExtV2) support, introduce new static
calls which act as gateways to call into the feature-dependent functions
based on what is available on the processor.

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