From: Ingo Molnar Date: Thu, 28 Apr 2016 08:35:17 +0000 (+0200) Subject: Merge branch 'perf/urgent' into perf/core, to resolve conflict X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0b20e59cef927b030c2e626f40fc4965bacec847;p=openwrt%2Fstaging%2Fblogic.git Merge branch 'perf/urgent' into perf/core, to resolve conflict Conflicts: arch/x86/events/intel/pt.c Signed-off-by: Ingo Molnar --- 0b20e59cef927b030c2e626f40fc4965bacec847 diff --cc arch/x86/events/intel/pt.c index 1aefd430e752,09a77dbc73c9..05ef87d839fd --- a/arch/x86/events/intel/pt.c +++ b/arch/x86/events/intel/pt.c @@@ -969,18 -1038,15 +1018,21 @@@ EXPORT_SYMBOL_GPL(intel_pt_handle_vmx) static void pt_event_start(struct perf_event *event, int mode) { + struct hw_perf_event *hwc = &event->hw; struct pt *pt = this_cpu_ptr(&pt_ctx); - struct pt_buffer *buf = perf_get_aux(&pt->handle); + struct pt_buffer *buf; + if (READ_ONCE(pt->vmx_on)) + return; + - if (!buf || pt_buffer_is_full(buf, pt)) { - event->hw.state = PERF_HES_STOPPED; - return; + buf = perf_aux_output_begin(&pt->handle, event); + if (!buf) + goto fail_stop; + + pt_buffer_reset_offsets(buf, pt->handle.head); + if (!buf->snapshot) { + if (pt_buffer_reset_markers(buf, &pt->handle)) + goto fail_end_stop; } ACCESS_ONCE(pt->handle_nmi) = 1;