diff mbox series

[v3,2/2] coresight: etm4x: docs: Add documentation for 'ts_source' sysfs interface

Message ID 20220823160650.455823-3-james.clark@arm.com (mailing list archive)
State New, archived
Headers show
Series coresight: etm4x: Expose default timestamp source in sysfs | expand

Commit Message

James Clark Aug. 23, 2022, 4:06 p.m. UTC
From: German Gomez <german.gomez@arm.com>

Sync sysfs documentation pages to include the new ts_source (timestamp
source) interface.

Signed-off-by: German Gomez <german.gomez@arm.com>
Signed-off-by: James Clark <james.clark@arm.com>
---
 .../ABI/testing/sysfs-bus-coresight-devices-etm4x  |  8 ++++++++
 .../trace/coresight/coresight-etm4x-reference.rst  | 14 ++++++++++++++
 2 files changed, 22 insertions(+)

Comments

Bagas Sanjaya Aug. 24, 2022, 2:54 a.m. UTC | #1
On 8/23/22 23:06, James Clark wrote:
> +:Example:
> +    ``$> cat ts_source``
> +
> +    ``$> 1``
> +

Shouldn't literal code block be used instead for example snippet
above?
James Clark Aug. 24, 2022, 1:59 p.m. UTC | #2
On 24/08/2022 03:54, Bagas Sanjaya wrote:
> On 8/23/22 23:06, James Clark wrote:
>> +:Example:
>> +    ``$> cat ts_source``
>> +
>> +    ``$> 1``
>> +
> 
> Shouldn't literal code block be used instead for example snippet
> above?
> 

It's consistent with the rest of the file. I think consistency for
something like this is more important than accuracy otherwise the new
entry would appear out of place.

Maybe they should all be changed to a different style, but that would be
a separate change unrelated to this set.

James
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x
index 8e53a32f8150..08b1964f27d3 100644
--- a/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x
+++ b/Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x
@@ -516,3 +516,11 @@  Contact:	Mathieu Poirier <mathieu.poirier@linaro.org>
 Description:	(Read) Returns the number of special conditional P1 right-hand keys
 		that the trace unit can use (0x194).  The value is taken
 		directly from the HW.
+
+What:		/sys/bus/coresight/devices/etm<N>/ts_source
+Date:		October 2022
+KernelVersion:	6.1
+Contact:	Mathieu Poirier <mathieu.poirier@linaro.org> or Suzuki K Poulose <suzuki.poulose@arm.com>
+Description:	(Read) When FEAT_TRF is implemented, value of TRFCR_ELx.TS used for
+		trace session. Otherwise -1 indicates an unknown time source. Check
+		trcidr0.tssize to see if a global timestamp is available.
diff --git a/Documentation/trace/coresight/coresight-etm4x-reference.rst b/Documentation/trace/coresight/coresight-etm4x-reference.rst
index fb7578fd9372..70e34b8c81c1 100644
--- a/Documentation/trace/coresight/coresight-etm4x-reference.rst
+++ b/Documentation/trace/coresight/coresight-etm4x-reference.rst
@@ -71,6 +71,20 @@ 
 
 ----
 
+:File:            ``ts_source`` (ro)
+:Trace Registers: None.
+:Notes:
+    When FEAT_TRF is implemented, value of TRFCR_ELx.TS used for trace session. Otherwise -1
+    indicates an unknown time source. Check trcidr0.tssize to see if a global timestamp is
+    available.
+
+:Example:
+    ``$> cat ts_source``
+
+    ``$> 1``
+
+----
+
 :File:            ``addr_idx`` (rw)
 :Trace Registers: None.
 :Notes: