diff options
Diffstat (limited to 'arch/x86/kernel/cpu/perf_event_intel_pt.c')
-rw-r--r-- | arch/x86/kernel/cpu/perf_event_intel_pt.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/perf_event_intel_pt.c b/arch/x86/kernel/cpu/perf_event_intel_pt.c index 868e1194337f..c0bbd1033b7c 100644 --- a/arch/x86/kernel/cpu/perf_event_intel_pt.c +++ b/arch/x86/kernel/cpu/perf_event_intel_pt.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/perf_event.h> | 27 | #include <asm/perf_event.h> |
28 | #include <asm/insn.h> | 28 | #include <asm/insn.h> |
29 | #include <asm/io.h> | 29 | #include <asm/io.h> |
30 | #include <asm/intel_pt.h> | ||
30 | 31 | ||
31 | #include "perf_event.h" | 32 | #include "perf_event.h" |
32 | #include "intel_pt.h" | 33 | #include "intel_pt.h" |
@@ -1122,6 +1123,14 @@ static int pt_event_init(struct perf_event *event) | |||
1122 | return 0; | 1123 | return 0; |
1123 | } | 1124 | } |
1124 | 1125 | ||
1126 | void cpu_emergency_stop_pt(void) | ||
1127 | { | ||
1128 | struct pt *pt = this_cpu_ptr(&pt_ctx); | ||
1129 | |||
1130 | if (pt->handle.event) | ||
1131 | pt_event_stop(pt->handle.event, PERF_EF_UPDATE); | ||
1132 | } | ||
1133 | |||
1125 | static __init int pt_init(void) | 1134 | static __init int pt_init(void) |
1126 | { | 1135 | { |
1127 | int ret, cpu, prior_warn = 0; | 1136 | int ret, cpu, prior_warn = 0; |