diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-12-08 05:50:24 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-12-08 05:50:24 -0500 |
commit | 2a2662bf88e693d477ef08351d03934f7bc0b51c (patch) | |
tree | cef243df159cc12ada7e97998a253df7c0abb2a2 /arch/x86/include/asm | |
parent | b2776bf7149bddd1f4161f14f79520f17fc1d71d (diff) | |
parent | 36748b9518a2437beffe861b47dff6d12b736b3f (diff) |
Merge branch 'perf/core-v3' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks into perf/hw_breakpoints
Pull AMD range breakpoints support from Frederic Weisbecker:
" - Extend breakpoint tools and core to support address range through perf
event with initial backend support for AMD extended breakpoints.
Syntax is:
perf record -e mem:addr/len:type
For example set write breakpoint from 0x1000 to 0x1200 (0x1000 + 512)
perf record -e mem:0x1000/512:w
- Clean up a bit breakpoint code validation
It has been acked by Jiri and Oleg. "
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/cpufeature.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/debugreg.h | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/hw_breakpoint.h | 1 | ||||
-rw-r--r-- | arch/x86/include/asm/perf_event.h | 3 |
4 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/include/asm/cpufeature.h b/arch/x86/include/asm/cpufeature.h index 0bb1335313b2..53966d65591e 100644 --- a/arch/x86/include/asm/cpufeature.h +++ b/arch/x86/include/asm/cpufeature.h | |||
@@ -174,6 +174,7 @@ | |||
174 | #define X86_FEATURE_TOPOEXT ( 6*32+22) /* topology extensions CPUID leafs */ | 174 | #define X86_FEATURE_TOPOEXT ( 6*32+22) /* topology extensions CPUID leafs */ |
175 | #define X86_FEATURE_PERFCTR_CORE ( 6*32+23) /* core performance counter extensions */ | 175 | #define X86_FEATURE_PERFCTR_CORE ( 6*32+23) /* core performance counter extensions */ |
176 | #define X86_FEATURE_PERFCTR_NB ( 6*32+24) /* NB performance counter extensions */ | 176 | #define X86_FEATURE_PERFCTR_NB ( 6*32+24) /* NB performance counter extensions */ |
177 | #define X86_FEATURE_BPEXT (6*32+26) /* data breakpoint extension */ | ||
177 | #define X86_FEATURE_PERFCTR_L2 ( 6*32+28) /* L2 performance counter extensions */ | 178 | #define X86_FEATURE_PERFCTR_L2 ( 6*32+28) /* L2 performance counter extensions */ |
178 | 179 | ||
179 | /* | 180 | /* |
@@ -383,6 +384,7 @@ extern const char * const x86_bug_flags[NBUGINTS*32]; | |||
383 | #define cpu_has_cx16 boot_cpu_has(X86_FEATURE_CX16) | 384 | #define cpu_has_cx16 boot_cpu_has(X86_FEATURE_CX16) |
384 | #define cpu_has_eager_fpu boot_cpu_has(X86_FEATURE_EAGER_FPU) | 385 | #define cpu_has_eager_fpu boot_cpu_has(X86_FEATURE_EAGER_FPU) |
385 | #define cpu_has_topoext boot_cpu_has(X86_FEATURE_TOPOEXT) | 386 | #define cpu_has_topoext boot_cpu_has(X86_FEATURE_TOPOEXT) |
387 | #define cpu_has_bpext boot_cpu_has(X86_FEATURE_BPEXT) | ||
386 | 388 | ||
387 | #if __GNUC__ >= 4 | 389 | #if __GNUC__ >= 4 |
388 | extern void warn_pre_alternatives(void); | 390 | extern void warn_pre_alternatives(void); |
diff --git a/arch/x86/include/asm/debugreg.h b/arch/x86/include/asm/debugreg.h index 61fd18b83b6c..12cb66f6d3a5 100644 --- a/arch/x86/include/asm/debugreg.h +++ b/arch/x86/include/asm/debugreg.h | |||
@@ -114,5 +114,10 @@ static inline void debug_stack_usage_inc(void) { } | |||
114 | static inline void debug_stack_usage_dec(void) { } | 114 | static inline void debug_stack_usage_dec(void) { } |
115 | #endif /* X86_64 */ | 115 | #endif /* X86_64 */ |
116 | 116 | ||
117 | #ifdef CONFIG_CPU_SUP_AMD | ||
118 | extern void set_dr_addr_mask(unsigned long mask, int dr); | ||
119 | #else | ||
120 | static inline void set_dr_addr_mask(unsigned long mask, int dr) { } | ||
121 | #endif | ||
117 | 122 | ||
118 | #endif /* _ASM_X86_DEBUGREG_H */ | 123 | #endif /* _ASM_X86_DEBUGREG_H */ |
diff --git a/arch/x86/include/asm/hw_breakpoint.h b/arch/x86/include/asm/hw_breakpoint.h index ef1c4d2d41ec..6c98be864a75 100644 --- a/arch/x86/include/asm/hw_breakpoint.h +++ b/arch/x86/include/asm/hw_breakpoint.h | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | struct arch_hw_breakpoint { | 13 | struct arch_hw_breakpoint { |
14 | unsigned long address; | 14 | unsigned long address; |
15 | unsigned long mask; | ||
15 | u8 len; | 16 | u8 len; |
16 | u8 type; | 17 | u8 type; |
17 | }; | 18 | }; |
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h index 8dfc9fd094a3..dc0f6ed35b08 100644 --- a/arch/x86/include/asm/perf_event.h +++ b/arch/x86/include/asm/perf_event.h | |||
@@ -177,6 +177,9 @@ struct x86_pmu_capability { | |||
177 | #define IBS_CAPS_BRNTRGT (1U<<5) | 177 | #define IBS_CAPS_BRNTRGT (1U<<5) |
178 | #define IBS_CAPS_OPCNTEXT (1U<<6) | 178 | #define IBS_CAPS_OPCNTEXT (1U<<6) |
179 | #define IBS_CAPS_RIPINVALIDCHK (1U<<7) | 179 | #define IBS_CAPS_RIPINVALIDCHK (1U<<7) |
180 | #define IBS_CAPS_OPBRNFUSE (1U<<8) | ||
181 | #define IBS_CAPS_FETCHCTLEXTD (1U<<9) | ||
182 | #define IBS_CAPS_OPDATA4 (1U<<10) | ||
180 | 183 | ||
181 | #define IBS_CAPS_DEFAULT (IBS_CAPS_AVAIL \ | 184 | #define IBS_CAPS_DEFAULT (IBS_CAPS_AVAIL \ |
182 | | IBS_CAPS_FETCHSAM \ | 185 | | IBS_CAPS_FETCHSAM \ |