]> Pileus Git - ~andy/linux/blobdiff - arch/x86/kernel/cpu/perf_event_intel_ds.c
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / arch / x86 / kernel / cpu / perf_event_intel_ds.c
index f71c9f09fd4befbc63a4e5b4370148c17d57c897..26830f3af0df70eebb438ddc82f74240b49d618e 100644 (file)
@@ -730,3 +730,13 @@ void intel_ds_init(void)
                }
        }
 }
+
+void perf_restore_debug_store(void)
+{
+       struct debug_store *ds = __this_cpu_read(cpu_hw_events.ds);
+
+       if (!x86_pmu.bts && !x86_pmu.pebs)
+               return;
+
+       wrmsrl(MSR_IA32_DS_AREA, (unsigned long)ds);
+}