]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/hwtracing/coresight/coresight-etm-perf.c
Merge tag 'linux-kselftest-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / drivers / hwtracing / coresight / coresight-etm-perf.c
index 17741969026e0e23391763d8ce1907729c1184e1..288a423c1b27022e21e887beceb5e1709af18f84 100644 (file)
@@ -242,6 +242,7 @@ static void *etm_setup_aux(int event_cpu, void **pages,
        if (!sink_ops(sink)->alloc_buffer)
                goto err;
 
+       cpu = cpumask_first(mask);
        /* Get the AUX specific data from the sink buffer */
        event_data->snk_config =
                        sink_ops(sink)->alloc_buffer(sink, cpu, pages,
@@ -301,7 +302,8 @@ out:
        return;
 
 fail_end_stop:
-       perf_aux_output_end(handle, 0, true);
+       perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED);
+       perf_aux_output_end(handle, 0);
 fail:
        event->hw.state = PERF_HES_STOPPED;
        goto out;
@@ -309,7 +311,6 @@ fail:
 
 static void etm_event_stop(struct perf_event *event, int mode)
 {
-       bool lost;
        int cpu = smp_processor_id();
        unsigned long size;
        struct coresight_device *sink, *csdev = per_cpu(csdev_src, cpu);
@@ -347,10 +348,9 @@ static void etm_event_stop(struct perf_event *event, int mode)
                        return;
 
                size = sink_ops(sink)->reset_buffer(sink, handle,
-                                                   event_data->snk_config,
-                                                   &lost);
+                                                   event_data->snk_config);
 
-               perf_aux_output_end(handle, size, lost);
+               perf_aux_output_end(handle, size);
        }
 
        /* Disabling the path make its elements available to other sessions */