Skip to content

Commit 2b888e4

Browse files
coresight: etm4x: adding config and traceid registers
Adding new sysFS management interface to query the configuration and the traceid registers. Both are required to convey information to the perf cmd line tools when using ETMv4 tracers as PMU. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 7c38aa4b03b3fc6ce17e5a00327f8c0be18daf8a)
1 parent f069ef6 commit 2b888e4

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Documentation/ABI/testing/sysfs-bus-coresight-devices-etm4x

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,19 @@ Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
359359
Description: (R) Print the content of the Peripheral ID3 Register
360360
(0xFEC). The value is taken directly from the HW.
361361

362+
What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trcconfig
363+
Date: February 2016
364+
KernelVersion: 4.07
365+
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
366+
Description: (R) Print the content of the trace configuration register
367+
(0x010) as currently set by SW.
368+
369+
What: /sys/bus/coresight/devices/<memory_map>.etm/mgmt/trctraceid
370+
Date: February 2016
371+
KernelVersion: 4.07
372+
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
373+
Description: (R) Print the content of the trace ID register (0x040).
374+
362375
What: /sys/bus/coresight/devices/<memory_map>.etm/trcidr/trcidr0
363376
Date: April 2015
364377
KernelVersion: 4.01

drivers/hwtracing/coresight/coresight-etm4x-sysfs.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,6 +1972,8 @@ coresight_simple_func(trcoslsr, TRCOSLSR);
19721972
coresight_simple_func(trcpdcr, TRCPDCR);
19731973
coresight_simple_func(trcpdsr, TRCPDSR);
19741974
coresight_simple_func(trclsr, TRCLSR);
1975+
coresight_simple_func(trcconfig, TRCCONFIGR);
1976+
coresight_simple_func(trctraceid, TRCTRACEIDR);
19751977
coresight_simple_func(trcauthstatus, TRCAUTHSTATUS);
19761978
coresight_simple_func(trcdevid, TRCDEVID);
19771979
coresight_simple_func(trcdevtype, TRCDEVTYPE);
@@ -1985,6 +1987,8 @@ static struct attribute *coresight_etmv4_mgmt_attrs[] = {
19851987
&dev_attr_trcpdcr.attr,
19861988
&dev_attr_trcpdsr.attr,
19871989
&dev_attr_trclsr.attr,
1990+
&dev_attr_trcconfig.attr,
1991+
&dev_attr_trctraceid.attr,
19881992
&dev_attr_trcauthstatus.attr,
19891993
&dev_attr_trcdevid.attr,
19901994
&dev_attr_trcdevtype.attr,

0 commit comments

Comments
 (0)