* [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4
@ 2020-06-16 9:33 Mike Leach
2020-06-16 9:33 ` [PATCH 1/3] coresight: Fix comment in main header file Mike Leach
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Mike Leach @ 2020-06-16 9:33 UTC (permalink / raw)
To: linux-arm-kernel, coresight, mathieu.poirier; +Cc: Mike Leach, suzuki.poulose
Set consists of minor fixes discovered during other development work.
Fixes are stand-alone and not directly part of new work.
Mike Leach (3):
coresight: Fix comment in main header file.
coresight: etmv4: Counter values not saved on disable.
coresight: etmv4: Fix resource selector constant.
drivers/hwtracing/coresight/coresight-etm4x.c | 6 ++++++
drivers/hwtracing/coresight/coresight-etm4x.h | 4 ++--
include/linux/coresight.h | 3 ++-
3 files changed, 10 insertions(+), 3 deletions(-)
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/3] coresight: Fix comment in main header file.
2020-06-16 9:33 [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mike Leach
@ 2020-06-16 9:33 ` Mike Leach
2020-06-16 9:33 ` [PATCH 2/3] coresight: etmv4: Counter values not saved on disable Mike Leach
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Mike Leach @ 2020-06-16 9:33 UTC (permalink / raw)
To: linux-arm-kernel, coresight, mathieu.poirier; +Cc: Mike Leach, suzuki.poulose
Comment for an elemnt in the coresight_device structure appears to have
been corrupted & makes no sense. Fix this before making further changes.
Signed-off-by: Mike Leach <mike.leach@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
include/linux/coresight.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/coresight.h b/include/linux/coresight.h
index e55499dcc010..fc320dd2cedc 100644
--- a/include/linux/coresight.h
+++ b/include/linux/coresight.h
@@ -180,7 +180,8 @@ struct coresight_sysfs_link {
* @enable: 'true' if component is currently part of an active path.
* @activated: 'true' only if a _sink_ has been activated. A sink can be
* activated but not yet enabled. Enabling for a _sink_
- * appens when a source has been selected for that it.
+ * happens when a source has been selected and a path is enabled
+ * from source to that sink.
* @ea: Device attribute for sink representation under PMU directory.
* @def_sink: cached reference to default sink found for this device.
* @last_sink: Name of last sink used for this source to trace into. Set when
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/3] coresight: etmv4: Counter values not saved on disable.
2020-06-16 9:33 [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mike Leach
2020-06-16 9:33 ` [PATCH 1/3] coresight: Fix comment in main header file Mike Leach
@ 2020-06-16 9:33 ` Mike Leach
2020-06-16 9:33 ` [PATCH 3/3] coresight: etmv4: Fix resource selector constant Mike Leach
2020-06-17 16:37 ` [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mathieu Poirier
3 siblings, 0 replies; 5+ messages in thread
From: Mike Leach @ 2020-06-16 9:33 UTC (permalink / raw)
To: linux-arm-kernel, coresight, mathieu.poirier; +Cc: Mike Leach, suzuki.poulose
The counter value registers change during operation, however this change
is not reflected in the values seen by the user in sysfs.
This fixes the issue by reading back the values on disable.
Signed-off-by: Mike Leach <mike.leach@linaro.org>
---
drivers/hwtracing/coresight/coresight-etm4x.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index 747afc875f91..60a5133d801c 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -507,6 +507,12 @@ static void etm4_disable_hw(void *info)
readl_relaxed(drvdata->base + TRCSSCSRn(i));
}
+ /* read back the current counter values */
+ for (i = 0; i < drvdata->nr_cntr; i++) {
+ config->cntr_val[i] =
+ readl_relaxed(drvdata->base + TRCCNTVRn(i));
+ }
+
coresight_disclaim_device_unlocked(drvdata->base);
CS_LOCK(drvdata->base);
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/3] coresight: etmv4: Fix resource selector constant.
2020-06-16 9:33 [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mike Leach
2020-06-16 9:33 ` [PATCH 1/3] coresight: Fix comment in main header file Mike Leach
2020-06-16 9:33 ` [PATCH 2/3] coresight: etmv4: Counter values not saved on disable Mike Leach
@ 2020-06-16 9:33 ` Mike Leach
2020-06-17 16:37 ` [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mathieu Poirier
3 siblings, 0 replies; 5+ messages in thread
From: Mike Leach @ 2020-06-16 9:33 UTC (permalink / raw)
To: linux-arm-kernel, coresight, mathieu.poirier; +Cc: Mike Leach, suzuki.poulose
ETMv4 max resource selector constant incorrectly set to 16. Updated to the
correct 32 value, and adjustments made to limited code using it.
Signed-off-by: Mike Leach <mike.leach@linaro.org>
---
drivers/hwtracing/coresight/coresight-etm4x.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
index 4a695bf90582..b0d633daf716 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.h
+++ b/drivers/hwtracing/coresight/coresight-etm4x.h
@@ -133,7 +133,7 @@
#define ETMv4_MAX_CTXID_CMP 8
#define ETM_MAX_VMID_CMP 8
#define ETM_MAX_PE_CMP 8
-#define ETM_MAX_RES_SEL 16
+#define ETM_MAX_RES_SEL 32
#define ETM_MAX_SS_CMP 8
#define ETM_ARCH_V4 0x40
@@ -325,7 +325,7 @@ struct etmv4_save_state {
u32 trccntctlr[ETMv4_MAX_CNTR];
u32 trccntvr[ETMv4_MAX_CNTR];
- u32 trcrsctlr[ETM_MAX_RES_SEL * 2];
+ u32 trcrsctlr[ETM_MAX_RES_SEL];
u32 trcssccr[ETM_MAX_SS_CMP];
u32 trcsscsr[ETM_MAX_SS_CMP];
--
2.17.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4
2020-06-16 9:33 [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mike Leach
` (2 preceding siblings ...)
2020-06-16 9:33 ` [PATCH 3/3] coresight: etmv4: Fix resource selector constant Mike Leach
@ 2020-06-17 16:37 ` Mathieu Poirier
3 siblings, 0 replies; 5+ messages in thread
From: Mathieu Poirier @ 2020-06-17 16:37 UTC (permalink / raw)
To: Mike Leach; +Cc: coresight, linux-arm-kernel, suzuki.poulose
On Tue, Jun 16, 2020 at 10:33:30AM +0100, Mike Leach wrote:
> Set consists of minor fixes discovered during other development work.
> Fixes are stand-alone and not directly part of new work.
>
> Mike Leach (3):
> coresight: Fix comment in main header file.
> coresight: etmv4: Counter values not saved on disable.
> coresight: etmv4: Fix resource selector constant.
>
> drivers/hwtracing/coresight/coresight-etm4x.c | 6 ++++++
> drivers/hwtracing/coresight/coresight-etm4x.h | 4 ++--
> include/linux/coresight.h | 3 ++-
> 3 files changed, 10 insertions(+), 3 deletions(-)
I have applied all the patches in this set.
Thanks,
Mathieu
>
> --
> 2.17.1
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-06-17 16:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-16 9:33 [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mike Leach
2020-06-16 9:33 ` [PATCH 1/3] coresight: Fix comment in main header file Mike Leach
2020-06-16 9:33 ` [PATCH 2/3] coresight: etmv4: Counter values not saved on disable Mike Leach
2020-06-16 9:33 ` [PATCH 3/3] coresight: etmv4: Fix resource selector constant Mike Leach
2020-06-17 16:37 ` [PATCH 0/3] coresight: minor fixes for CoreSight and ETMv4 Mathieu Poirier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).