Skip to content

Commit 0dd28e2

Browse files
virtuosoingomolnar
authored andcommitted
perf/x86/intel/pt: Move PT specific MSR bit definitions to a private header
Nothing outside of the Intel PT driver should ever care about its MSR bits, so there is no reason to keep them in msr-index.h. This patch moves them to a pt-local header. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: vince@deater.net Link: http://lkml.kernel.org/r/1461771888-10409-3-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent c796bbb commit 0dd28e2

2 files changed

Lines changed: 24 additions & 20 deletions

File tree

‎arch/x86/events/intel/pt.h‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,30 @@
1919
#ifndef __INTEL_PT_H__
2020
#define __INTEL_PT_H__
2121

22+
/*
23+
* PT MSR bit definitions
24+
*/
25+
#define RTIT_CTL_TRACEEN BIT(0)
26+
#define RTIT_CTL_CYCLEACC BIT(1)
27+
#define RTIT_CTL_OS BIT(2)
28+
#define RTIT_CTL_USR BIT(3)
29+
#define RTIT_CTL_CR3EN BIT(7)
30+
#define RTIT_CTL_TOPA BIT(8)
31+
#define RTIT_CTL_MTC_EN BIT(9)
32+
#define RTIT_CTL_TSC_EN BIT(10)
33+
#define RTIT_CTL_DISRETC BIT(11)
34+
#define RTIT_CTL_BRANCH_EN BIT(13)
35+
#define RTIT_CTL_MTC_RANGE_OFFSET 14
36+
#define RTIT_CTL_MTC_RANGE (0x0full << RTIT_CTL_MTC_RANGE_OFFSET)
37+
#define RTIT_CTL_CYC_THRESH_OFFSET 19
38+
#define RTIT_CTL_CYC_THRESH (0x0full << RTIT_CTL_CYC_THRESH_OFFSET)
39+
#define RTIT_CTL_PSB_FREQ_OFFSET 24
40+
#define RTIT_CTL_PSB_FREQ (0x0full << RTIT_CTL_PSB_FREQ_OFFSET)
41+
#define RTIT_STATUS_CONTEXTEN BIT(1)
42+
#define RTIT_STATUS_TRIGGEREN BIT(2)
43+
#define RTIT_STATUS_ERROR BIT(4)
44+
#define RTIT_STATUS_STOPPED BIT(5)
45+
2246
/*
2347
* Single-entry ToPA: when this close to region boundary, switch
2448
* buffers to avoid losing data.

‎arch/x86/include/asm/msr-index.h‎

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,27 +89,7 @@
8989
#define MSR_PEBS_LD_LAT_THRESHOLD 0x000003f6
9090

9191
#define MSR_IA32_RTIT_CTL 0x00000570
92-
#define RTIT_CTL_TRACEEN BIT(0)
93-
#define RTIT_CTL_CYCLEACC BIT(1)
94-
#define RTIT_CTL_OS BIT(2)
95-
#define RTIT_CTL_USR BIT(3)
96-
#define RTIT_CTL_CR3EN BIT(7)
97-
#define RTIT_CTL_TOPA BIT(8)
98-
#define RTIT_CTL_MTC_EN BIT(9)
99-
#define RTIT_CTL_TSC_EN BIT(10)
100-
#define RTIT_CTL_DISRETC BIT(11)
101-
#define RTIT_CTL_BRANCH_EN BIT(13)
102-
#define RTIT_CTL_MTC_RANGE_OFFSET 14
103-
#define RTIT_CTL_MTC_RANGE (0x0full << RTIT_CTL_MTC_RANGE_OFFSET)
104-
#define RTIT_CTL_CYC_THRESH_OFFSET 19
105-
#define RTIT_CTL_CYC_THRESH (0x0full << RTIT_CTL_CYC_THRESH_OFFSET)
106-
#define RTIT_CTL_PSB_FREQ_OFFSET 24
107-
#define RTIT_CTL_PSB_FREQ (0x0full << RTIT_CTL_PSB_FREQ_OFFSET)
10892
#define MSR_IA32_RTIT_STATUS 0x00000571
109-
#define RTIT_STATUS_CONTEXTEN BIT(1)
110-
#define RTIT_STATUS_TRIGGEREN BIT(2)
111-
#define RTIT_STATUS_ERROR BIT(4)
112-
#define RTIT_STATUS_STOPPED BIT(5)
11393
#define MSR_IA32_RTIT_CR3_MATCH 0x00000572
11494
#define MSR_IA32_RTIT_OUTPUT_BASE 0x00000560
11595
#define MSR_IA32_RTIT_OUTPUT_MASK 0x00000561

0 commit comments

Comments
 (0)