On Wed, Jun 10, 2020 at 10:13:31AM +0100, Mike Leach wrote:
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));
- }
I have applied patches 1 and 2 in this set - no need to send them again.
Thanks, Mathieu
coresight_disclaim_device_unlocked(drvdata->base); CS_LOCK(drvdata->base); -- 2.17.1