summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/coresight/coresight-etm4x.h
diff options
context:
space:
mode:
authorMike Leach <mike.leach@linaro.org>2023-01-16 15:49:18 +0300
committerSuzuki K Poulose <suzuki.poulose@arm.com>2023-01-19 13:16:47 +0300
commitdf4871204e5de97e47959f826e9cd2e76b41f969 (patch)
tree22f402df01c90ff0f4a74538a2734e8aadd32902 /drivers/hwtracing/coresight/coresight-etm4x.h
parent8d1091c785e1599cccb3d14c54c79e4d7e325220 (diff)
downloadlinux-df4871204e5de97e47959f826e9cd2e76b41f969.tar.xz
coresight: etm4x: Update ETM4 driver to use Trace ID API
The trace ID API is now used to allocate trace IDs for ETM4.x / ETE devices. For perf sessions, these will be allocated on enable, and released on disable. For sysfs sessions, these will be allocated on enable, but only released on reset. This allows the sysfs session to interrogate the Trace ID used after the session is over - maintaining functional consistency with the previous allocation scheme. The trace ID will also be allocated on read of the mgmt/trctraceid file. This ensures that if perf or sysfs read this before enabling trace, the value will be the one used for the trace session. Trace ID initialisation is removed from the _probe() function. Signed-off-by: Mike Leach <mike.leach@linaro.org> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Link: https://lore.kernel.org/r/20230116124928.5440-6-mike.leach@linaro.org
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-etm4x.h')
-rw-r--r--drivers/hwtracing/coresight/coresight-etm4x.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
index 4b21bb79f168..434f4e95ee17 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.h
+++ b/drivers/hwtracing/coresight/coresight-etm4x.h
@@ -1095,4 +1095,7 @@ static inline bool etm4x_is_ete(struct etmv4_drvdata *drvdata)
{
return drvdata->arch >= ETM_ARCH_ETE;
}
+
+int etm4_read_alloc_trace_id(struct etmv4_drvdata *drvdata);
+void etm4_release_trace_id(struct etmv4_drvdata *drvdata);
#endif