summaryrefslogtreecommitdiffstats
path: root/arch/x86/events/perf_event.h
diff options
context:
space:
mode:
authorKan Liang <kan.liang@linux.intel.com>2020-07-03 14:49:18 +0200
committerPeter Zijlstra <peterz@infradead.org>2020-07-08 11:38:54 +0200
commitfda1f99f34a8f0975086bcfef34da865009995c1 (patch)
tree3605f77b3b658a2969ab06b40e89a35cbdad7057 /arch/x86/events/perf_event.h
parentperf/x86/intel/lbr: Mark the {rd,wr}lbr_{to,from} wrappers __always_inline (diff)
downloadlinux-fda1f99f34a8f0975086bcfef34da865009995c1.tar.xz
linux-fda1f99f34a8f0975086bcfef34da865009995c1.zip
perf/x86/intel/lbr: Factor out rdlbr_all() and wrlbr_all()
The previous model-specific LBR and Architecture LBR (legacy way) use a similar method to save/restore the LBR information, which directly accesses the LBR registers. The codes which read/write a set of LBR registers can be shared between them. Factor out two functions which are used to read/write a set of LBR registers. Add lbr_info into structure x86_pmu, and use it to replace the hardcoded LBR INFO MSR, because the LBR INFO MSR address of the previous model-specific LBR is different from Architecture LBR. The MSR address should be assigned at boot time. For now, only Sky Lake and later platforms have the LBR INFO MSR. Signed-off-by: Kan Liang <kan.liang@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/1593780569-62993-13-git-send-email-kan.liang@linux.intel.com
Diffstat (limited to 'arch/x86/events/perf_event.h')
-rw-r--r--arch/x86/events/perf_event.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
index aaa426d3d66e..20e35cb1705d 100644
--- a/arch/x86/events/perf_event.h
+++ b/arch/x86/events/perf_event.h
@@ -690,7 +690,7 @@ struct x86_pmu {
* Intel LBR
*/
unsigned int lbr_tos, lbr_from, lbr_to,
- lbr_nr; /* LBR base regs and size */
+ lbr_info, lbr_nr; /* LBR base regs and size */
union {
u64 lbr_sel_mask; /* LBR_SELECT valid bits */
u64 lbr_ctl_mask; /* LBR_CTL valid bits */