coresight: etm4x: Expose default timestamp source in sysfs
authorGerman Gomez <german.gomez@arm.com>
Tue, 23 Aug 2022 16:06:49 +0000 (17:06 +0100)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Fri, 26 Aug 2022 19:37:52 +0000 (13:37 -0600)
commit0f00b223ea22f9e32a82a6ffb5a4de0753c99b55
treee04898d087c6ea6b17b6fa2d62aab49f09ca8ba9
parent84fa8f159022aab8e93667b56672238b10cdbb9b
coresight: etm4x: Expose default timestamp source in sysfs

Add a new sysfs interface in /sys/bus/coresight/devices/etm<N>/ts_source
indicating the configured timestamp source when the ETM device driver
was probed.

The perf tool will use this information to detect if the trace data
timestamp matches the kernel time, enabling correlation of CoreSight
trace with perf events.

Suggested-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: German Gomez <german.gomez@arm.com>
Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: James Clark <james.clark@arm.com>
Link: https://lore.kernel.org/r/20220823160650.455823-2-james.clark@arm.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
arch/arm64/include/asm/sysreg.h
drivers/hwtracing/coresight/coresight-etm4x-sysfs.c