summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/coresight/coresight-tmc.h
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2019-08-29 23:28:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-03 23:01:17 +0300
commitbbedcb91cc3bf252e6031e199ab3d1f07107f7c5 (patch)
tree837d949bea4c25cf3d58d342ff6b4ddb5126e31f /drivers/hwtracing/coresight/coresight-tmc.h
parent13af88f312fc57becacfcbb1cc77f844281a30ec (diff)
downloadlinux-bbedcb91cc3bf252e6031e199ab3d1f07107f7c5.tar.xz
coresight: tmc-etr: Fix perf_data check
When tracing etm data of multiple threads on multiple cpus through perf interface, each cpu has a unique etr_perf_buffer while sharing the same etr device. There is no guarantee that the last cpu starts etm tracing also stops last. This makes perf_data check fail. Fix it by checking etr_buf instead of etr_perf_buffer. Also move the code setting and clearing perf_buf to more suitable places. Fixes: 3147da92a8a8 ("coresight: tmc-etr: Allocate and free ETR memory buffers for CPU-wide scenarios") Signed-off-by: Yabin Cui <yabinc@google.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Link: https://lore.kernel.org/r/20190829202842.580-15-mathieu.poirier@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-tmc.h')
-rw-r--r--drivers/hwtracing/coresight/coresight-tmc.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tmc.h b/drivers/hwtracing/coresight/coresight-tmc.h
index 4c59f2a4ad0e..9dbcdf453e22 100644
--- a/drivers/hwtracing/coresight/coresight-tmc.h
+++ b/drivers/hwtracing/coresight/coresight-tmc.h
@@ -182,8 +182,8 @@ struct etr_buf {
* device configuration register (DEVID)
* @idr: Holds etr_bufs allocated for this ETR.
* @idr_mutex: Access serialisation for idr.
- * @perf_data: PERF buffer for ETR.
- * @sysfs_data: SYSFS buffer for ETR.
+ * @sysfs_buf: SYSFS buffer for ETR.
+ * @perf_buf: PERF buffer for ETR.
*/
struct tmc_drvdata {
void __iomem *base;
@@ -206,7 +206,7 @@ struct tmc_drvdata {
struct idr idr;
struct mutex idr_mutex;
struct etr_buf *sysfs_buf;
- void *perf_data;
+ struct etr_buf *perf_buf;
};
struct etr_buf_operations {