diff options
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-trbe.c')
-rw-r--r-- | drivers/hwtracing/coresight/coresight-trbe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index 81bf183a73a1..4479e689c38a 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -252,13 +252,9 @@ static unsigned long __trbe_normal_offset(struct perf_output_handle *handle) * trbe_base trbe_base + nr_pages * * Perf aux buffer does not have any space for the driver to write into. - * Just communicate trace truncation event to the user space by marking - * it with PERF_AUX_FLAG_TRUNCATED. */ - if (!handle->size) { - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED); + if (!handle->size) return 0; - } /* Compute the tail and wakeup indices now that we've aligned head */ tail = PERF_IDX2OFF(handle->head + handle->size, buf); @@ -360,7 +356,6 @@ static unsigned long __trbe_normal_offset(struct perf_output_handle *handle) return limit; trbe_pad_buf(handle, handle->size); - perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED); return 0; } @@ -688,6 +683,11 @@ static void trbe_handle_spurious(struct perf_output_handle *handle) buf->trbe_write = buf->trbe_base + PERF_IDX2OFF(handle->head, buf); if (buf->trbe_limit == buf->trbe_base) { trbe_drain_and_disable_local(); + /* + * Just communicate trace truncation event to the user space by + * marking it with PERF_AUX_FLAG_TRUNCATED. + */ + perf_aux_output_flag(handle, PERF_AUX_FLAG_TRUNCATED); return; } trbe_enable_hw(buf); |