Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-16 Thread Kim Phillips
On Wed, 16 May 2018 13:18:23 -0600
Jonathan Corbet  wrote:

> On Mon, 14 May 2018 12:19:59 -0500
> Kim Phillips  wrote:
> 
> > - Align and show updated ls devices output from the TC2, based on
> >   current driver
> > 
> > - Provide an example from an ETMv4 based system (Juno)
> > 
> > - Reflect changes to the way the RAM write pointer is accessed since
> >   it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
> >   management entries").
> 
> So I was going to apply this, but it's been pretty badly corrupted by
> your mailer.  Could I ask you to retry, please?

I had sent a v3 that corrected the issue, in the same thread, here:

https://lkml.org/lkml/2018/5/14/1190

Mathieu acked that one.

Thanks,

Kim


Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-16 Thread Kim Phillips
On Wed, 16 May 2018 13:18:23 -0600
Jonathan Corbet  wrote:

> On Mon, 14 May 2018 12:19:59 -0500
> Kim Phillips  wrote:
> 
> > - Align and show updated ls devices output from the TC2, based on
> >   current driver
> > 
> > - Provide an example from an ETMv4 based system (Juno)
> > 
> > - Reflect changes to the way the RAM write pointer is accessed since
> >   it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
> >   management entries").
> 
> So I was going to apply this, but it's been pretty badly corrupted by
> your mailer.  Could I ask you to retry, please?

I had sent a v3 that corrected the issue, in the same thread, here:

https://lkml.org/lkml/2018/5/14/1190

Mathieu acked that one.

Thanks,

Kim


Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-16 Thread Jonathan Corbet
On Mon, 14 May 2018 12:19:59 -0500
Kim Phillips  wrote:

> - Align and show updated ls devices output from the TC2, based on
>   current driver
> 
> - Provide an example from an ETMv4 based system (Juno)
> 
> - Reflect changes to the way the RAM write pointer is accessed since
>   it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
>   management entries").

So I was going to apply this, but it's been pretty badly corrupted by
your mailer.  Could I ask you to retry, please?

Thanks,

jon


Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-16 Thread Jonathan Corbet
On Mon, 14 May 2018 12:19:59 -0500
Kim Phillips  wrote:

> - Align and show updated ls devices output from the TC2, based on
>   current driver
> 
> - Provide an example from an ETMv4 based system (Juno)
> 
> - Reflect changes to the way the RAM write pointer is accessed since
>   it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
>   management entries").

So I was going to apply this, but it's been pretty badly corrupted by
your mailer.  Could I ask you to retry, please?

Thanks,

jon


Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-14 Thread Randy Dunlap
On 05/14/2018 10:19 AM, Kim Phillips wrote:
> - Align and show updated ls devices output from the TC2, based on
>   current driver
> 
> - Provide an example from an ETMv4 based system (Juno)
> 
> - Reflect changes to the way the RAM write pointer is accessed since
>   it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
>   management entries").
> 
> Cc: Mathieu Poirier 
> Cc: Jonathan Corbet 
> Signed-off-by: Kim Phillips 
> ---
> v2: address Mathieu's comment about clarifying the sinks on the Juno
> vs. TC2 platforms.
> 
>  Documentation/trace/coresight.txt | 41 +++
>  1 file changed, 25 insertions(+), 16 deletions(-)
> 
> diff --git a/Documentation/trace/coresight.txt
> b/Documentation/trace/coresight.txt index 6f0120c3a4f1..134994e9fa6d
> 100644
> --- a/Documentation/trace/coresight.txt
> +++ b/Documentation/trace/coresight.txt
> @@ -144,10 +144,22 @@ If everything goes well during the registration
> process the new devices will show up under /sys/bus/coresight/devices,
> as showns here for a TC2 platform: 

  as shown here

>  root:~# ls /sys/bus/coresight/devices/
> -replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
> -2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
> +2001.etb   2004.funnel   2201d000.ptm  2203d000.etm
> replicator +2003.tpiu  2201c000.ptm   2203c000.etm
> 2203e000.etm root:~#
>  
> +and here for a Juno platform:
> +
> +root@juno:~# ls /sys/bus/coresight/devices/
> +2001.etf  2012.replicator  2204.etm
> 230c.funnel +2003.tpiu 2013.funnel
> 220c.funnel  2314.etm +2004.funnel
> 2014.etf2214.etm 2324.etm
> +2007.etr  2015.funnel  2304.etm
> 2334.etm +root@juno:~# +
> +Note that on Juno users can select the ETF, ETR and TPIU as a sink
> target while +on TC2, the ETB and TPIU can be selected.
> +
>  The functions take a "struct coresight_device", which looks like this:
>  
>  struct coresight_desc {
> @@ -193,16 +205,16 @@ the information carried in "THIS_MODULE".
>  How to use the tracer modules
>  -
>  
> -Before trace collection can start, a coresight sink needs to be
> identify. +Before trace collection can start, a coresight sink needs to

The - and + lines seems to be merged...

> be identified. There is no limit on the amount of sinks (nor sources)
> that can be enabled at any given moment.  As a generic operation, all
> device pertaining to the sink class will have an "active" entry in
> sysfs: 
>  root:/sys/bus/coresight/devices# ls
> -replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
> -2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
> +2001.etb   2004.funnel   2201d000.ptm  2203d000.etm
> replicator +2003.tpiu  2201c000.ptm   2203c000.etm
> 2203e000.etm root:/sys/bus/coresight/devices# ls 2001.etb
> -enable_sink  status  trigger_cntr
> +enable_sink  mgmt  power  subsystem  trigger_cntr  uevent
>  root:/sys/bus/coresight/devices# echo 1 > 2001.etb/enable_sink
>  root:/sys/bus/coresight/devices# cat 2001.etb/enable_sink
>  1
> @@ -216,16 +228,13 @@ trigger a trace capture:
>  root:/sys/bus/coresight/devices# echo 1 > 2201c000.ptm/enable_source
>  root:/sys/bus/coresight/devices# cat 2201c000.ptm/enable_source
>  1
> -root:/sys/bus/coresight/devices# cat 2001.etb/status
> -Depth:  0x2000
> -Status: 0x1
> -RAM read ptr:   0x0
> -RAM wrt ptr:0x19d3   <- The write pointer is moving
> -Trigger cnt:0x0
> -Control:0x1
> -Flush status:   0x0
> -Flush ctrl: 0x2001
> -root:/sys/bus/coresight/devices#
> +
> +Observe the write pointer moving:
> +
> +root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
> +0x1a8
> +root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
> +0x19a6
>  
>  Trace collection is stopped the same way:
>  
> 


-- 
~Randy


Re: [PATCH v2] coresight: documentation: update sysfs section

2018-05-14 Thread Randy Dunlap
On 05/14/2018 10:19 AM, Kim Phillips wrote:
> - Align and show updated ls devices output from the TC2, based on
>   current driver
> 
> - Provide an example from an ETMv4 based system (Juno)
> 
> - Reflect changes to the way the RAM write pointer is accessed since
>   it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
>   management entries").
> 
> Cc: Mathieu Poirier 
> Cc: Jonathan Corbet 
> Signed-off-by: Kim Phillips 
> ---
> v2: address Mathieu's comment about clarifying the sinks on the Juno
> vs. TC2 platforms.
> 
>  Documentation/trace/coresight.txt | 41 +++
>  1 file changed, 25 insertions(+), 16 deletions(-)
> 
> diff --git a/Documentation/trace/coresight.txt
> b/Documentation/trace/coresight.txt index 6f0120c3a4f1..134994e9fa6d
> 100644
> --- a/Documentation/trace/coresight.txt
> +++ b/Documentation/trace/coresight.txt
> @@ -144,10 +144,22 @@ If everything goes well during the registration
> process the new devices will show up under /sys/bus/coresight/devices,
> as showns here for a TC2 platform: 

  as shown here

>  root:~# ls /sys/bus/coresight/devices/
> -replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
> -2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
> +2001.etb   2004.funnel   2201d000.ptm  2203d000.etm
> replicator +2003.tpiu  2201c000.ptm   2203c000.etm
> 2203e000.etm root:~#
>  
> +and here for a Juno platform:
> +
> +root@juno:~# ls /sys/bus/coresight/devices/
> +2001.etf  2012.replicator  2204.etm
> 230c.funnel +2003.tpiu 2013.funnel
> 220c.funnel  2314.etm +2004.funnel
> 2014.etf2214.etm 2324.etm
> +2007.etr  2015.funnel  2304.etm
> 2334.etm +root@juno:~# +
> +Note that on Juno users can select the ETF, ETR and TPIU as a sink
> target while +on TC2, the ETB and TPIU can be selected.
> +
>  The functions take a "struct coresight_device", which looks like this:
>  
>  struct coresight_desc {
> @@ -193,16 +205,16 @@ the information carried in "THIS_MODULE".
>  How to use the tracer modules
>  -
>  
> -Before trace collection can start, a coresight sink needs to be
> identify. +Before trace collection can start, a coresight sink needs to

The - and + lines seems to be merged...

> be identified. There is no limit on the amount of sinks (nor sources)
> that can be enabled at any given moment.  As a generic operation, all
> device pertaining to the sink class will have an "active" entry in
> sysfs: 
>  root:/sys/bus/coresight/devices# ls
> -replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
> -2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
> +2001.etb   2004.funnel   2201d000.ptm  2203d000.etm
> replicator +2003.tpiu  2201c000.ptm   2203c000.etm
> 2203e000.etm root:/sys/bus/coresight/devices# ls 2001.etb
> -enable_sink  status  trigger_cntr
> +enable_sink  mgmt  power  subsystem  trigger_cntr  uevent
>  root:/sys/bus/coresight/devices# echo 1 > 2001.etb/enable_sink
>  root:/sys/bus/coresight/devices# cat 2001.etb/enable_sink
>  1
> @@ -216,16 +228,13 @@ trigger a trace capture:
>  root:/sys/bus/coresight/devices# echo 1 > 2201c000.ptm/enable_source
>  root:/sys/bus/coresight/devices# cat 2201c000.ptm/enable_source
>  1
> -root:/sys/bus/coresight/devices# cat 2001.etb/status
> -Depth:  0x2000
> -Status: 0x1
> -RAM read ptr:   0x0
> -RAM wrt ptr:0x19d3   <- The write pointer is moving
> -Trigger cnt:0x0
> -Control:0x1
> -Flush status:   0x0
> -Flush ctrl: 0x2001
> -root:/sys/bus/coresight/devices#
> +
> +Observe the write pointer moving:
> +
> +root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
> +0x1a8
> +root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
> +0x19a6
>  
>  Trace collection is stopped the same way:
>  
> 


-- 
~Randy


[PATCH v2] coresight: documentation: update sysfs section

2018-05-14 Thread Kim Phillips
- Align and show updated ls devices output from the TC2, based on
  current driver

- Provide an example from an ETMv4 based system (Juno)

- Reflect changes to the way the RAM write pointer is accessed since
  it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
  management entries").

Cc: Mathieu Poirier 
Cc: Jonathan Corbet 
Signed-off-by: Kim Phillips 
---
v2: address Mathieu's comment about clarifying the sinks on the Juno
vs. TC2 platforms.

 Documentation/trace/coresight.txt | 41 +++
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/Documentation/trace/coresight.txt
b/Documentation/trace/coresight.txt index 6f0120c3a4f1..134994e9fa6d
100644
--- a/Documentation/trace/coresight.txt
+++ b/Documentation/trace/coresight.txt
@@ -144,10 +144,22 @@ If everything goes well during the registration
process the new devices will show up under /sys/bus/coresight/devices,
as showns here for a TC2 platform: 
 root:~# ls /sys/bus/coresight/devices/
-replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
-2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
+2001.etb   2004.funnel 2201d000.ptm  2203d000.etm
replicator +2003.tpiu  2201c000.ptm 2203c000.etm
2203e000.etm root:~#
 
+and here for a Juno platform:
+
+root@juno:~# ls /sys/bus/coresight/devices/
+2001.etf2012.replicator  2204.etm
230c.funnel +2003.tpiu   2013.funnel
220c.funnel  2314.etm +2004.funnel
2014.etf  2214.etm 2324.etm
+2007.etr2015.funnel  2304.etm
2334.etm +root@juno:~# +
+Note that on Juno users can select the ETF, ETR and TPIU as a sink
target while +on TC2, the ETB and TPIU can be selected.
+
 The functions take a "struct coresight_device", which looks like this:
 
 struct coresight_desc {
@@ -193,16 +205,16 @@ the information carried in "THIS_MODULE".
 How to use the tracer modules
 -
 
-Before trace collection can start, a coresight sink needs to be
identify. +Before trace collection can start, a coresight sink needs to
be identified. There is no limit on the amount of sinks (nor sources)
that can be enabled at any given moment.  As a generic operation, all
device pertaining to the sink class will have an "active" entry in
sysfs: 
 root:/sys/bus/coresight/devices# ls
-replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
-2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
+2001.etb   2004.funnel 2201d000.ptm  2203d000.etm
replicator +2003.tpiu  2201c000.ptm 2203c000.etm
2203e000.etm root:/sys/bus/coresight/devices# ls 2001.etb
-enable_sink  status  trigger_cntr
+enable_sink  mgmt  power  subsystem  trigger_cntr  uevent
 root:/sys/bus/coresight/devices# echo 1 > 2001.etb/enable_sink
 root:/sys/bus/coresight/devices# cat 2001.etb/enable_sink
 1
@@ -216,16 +228,13 @@ trigger a trace capture:
 root:/sys/bus/coresight/devices# echo 1 > 2201c000.ptm/enable_source
 root:/sys/bus/coresight/devices# cat 2201c000.ptm/enable_source
 1
-root:/sys/bus/coresight/devices# cat 2001.etb/status
-Depth:  0x2000
-Status: 0x1
-RAM read ptr:   0x0
-RAM wrt ptr:0x19d3   <- The write pointer is moving
-Trigger cnt:0x0
-Control:0x1
-Flush status:   0x0
-Flush ctrl: 0x2001
-root:/sys/bus/coresight/devices#
+
+Observe the write pointer moving:
+
+root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
+0x1a8
+root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
+0x19a6
 
 Trace collection is stopped the same way:
 
-- 
2.17.0



[PATCH v2] coresight: documentation: update sysfs section

2018-05-14 Thread Kim Phillips
- Align and show updated ls devices output from the TC2, based on
  current driver

- Provide an example from an ETMv4 based system (Juno)

- Reflect changes to the way the RAM write pointer is accessed since
  it got changed in commit 7d83d17795ef ("coresight: tmc: adding sysFS
  management entries").

Cc: Mathieu Poirier 
Cc: Jonathan Corbet 
Signed-off-by: Kim Phillips 
---
v2: address Mathieu's comment about clarifying the sinks on the Juno
vs. TC2 platforms.

 Documentation/trace/coresight.txt | 41 +++
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/Documentation/trace/coresight.txt
b/Documentation/trace/coresight.txt index 6f0120c3a4f1..134994e9fa6d
100644
--- a/Documentation/trace/coresight.txt
+++ b/Documentation/trace/coresight.txt
@@ -144,10 +144,22 @@ If everything goes well during the registration
process the new devices will show up under /sys/bus/coresight/devices,
as showns here for a TC2 platform: 
 root:~# ls /sys/bus/coresight/devices/
-replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
-2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
+2001.etb   2004.funnel 2201d000.ptm  2203d000.etm
replicator +2003.tpiu  2201c000.ptm 2203c000.etm
2203e000.etm root:~#
 
+and here for a Juno platform:
+
+root@juno:~# ls /sys/bus/coresight/devices/
+2001.etf2012.replicator  2204.etm
230c.funnel +2003.tpiu   2013.funnel
220c.funnel  2314.etm +2004.funnel
2014.etf  2214.etm 2324.etm
+2007.etr2015.funnel  2304.etm
2334.etm +root@juno:~# +
+Note that on Juno users can select the ETF, ETR and TPIU as a sink
target while +on TC2, the ETB and TPIU can be selected.
+
 The functions take a "struct coresight_device", which looks like this:
 
 struct coresight_desc {
@@ -193,16 +205,16 @@ the information carried in "THIS_MODULE".
 How to use the tracer modules
 -
 
-Before trace collection can start, a coresight sink needs to be
identify. +Before trace collection can start, a coresight sink needs to
be identified. There is no limit on the amount of sinks (nor sources)
that can be enabled at any given moment.  As a generic operation, all
device pertaining to the sink class will have an "active" entry in
sysfs: 
 root:/sys/bus/coresight/devices# ls
-replicator  2003.tpiu2201c000.ptm  2203c000.etm  2203e000.etm
-2001.etb 2004.funnel  2201d000.ptm  2203d000.etm
+2001.etb   2004.funnel 2201d000.ptm  2203d000.etm
replicator +2003.tpiu  2201c000.ptm 2203c000.etm
2203e000.etm root:/sys/bus/coresight/devices# ls 2001.etb
-enable_sink  status  trigger_cntr
+enable_sink  mgmt  power  subsystem  trigger_cntr  uevent
 root:/sys/bus/coresight/devices# echo 1 > 2001.etb/enable_sink
 root:/sys/bus/coresight/devices# cat 2001.etb/enable_sink
 1
@@ -216,16 +228,13 @@ trigger a trace capture:
 root:/sys/bus/coresight/devices# echo 1 > 2201c000.ptm/enable_source
 root:/sys/bus/coresight/devices# cat 2201c000.ptm/enable_source
 1
-root:/sys/bus/coresight/devices# cat 2001.etb/status
-Depth:  0x2000
-Status: 0x1
-RAM read ptr:   0x0
-RAM wrt ptr:0x19d3   <- The write pointer is moving
-Trigger cnt:0x0
-Control:0x1
-Flush status:   0x0
-Flush ctrl: 0x2001
-root:/sys/bus/coresight/devices#
+
+Observe the write pointer moving:
+
+root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
+0x1a8
+root:/sys/bus/coresight/devices# cat 2001.etb/mgmt/rwp
+0x19a6
 
 Trace collection is stopped the same way:
 
-- 
2.17.0