]> git.baikalelectronics.ru Git - kernel.git/commit
coresight: tmc-etr: Decouple buffer sync and barrier packet insertion
authorMathieu Poirier <mathieu.poirier@linaro.org>
Thu, 29 Aug 2019 20:28:41 +0000 (14:28 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Sep 2019 20:01:18 +0000 (22:01 +0200)
commite9d3ecce9c219d9a7e293f7b80c64bdac61576a4
treef9c036ecc04318588a7ce78c4c5f4f4ba6f45133
parent6e91d01e54223a1697022cbd8c46377f0e5d4eb3
coresight: tmc-etr: Decouple buffer sync and barrier packet insertion

If less space is available in the perf ring buffer than the ETR buffer,
barrier packets inserted in the trace stream by tmc_sync_etr_buf() are
skipped over when the head of the buffer is moved forward, resulting in
traces that can't be decoded.

This patch decouples the process of syncing ETR buffers and the addition
of barrier packets in order to perform the latter once the offset in the
trace buffer has been properly computed.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20190829202842.580-17-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-tmc-etr.c