Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1388151 > unrolled thread

[PATCH V4 12/18] coresight: tmc: dump system memory content only when needed

Started byMathieu Poirier <mathieu.poirier@linaro.org>
First post2016-04-27 00:20 +0200
Last post2016-04-27 11:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH V4 12/18] coresight: tmc: dump system memory content only when needed Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-04-27 00:20 +0200
    Re: [PATCH V4 12/18] coresight: tmc: dump system memory content only  when needed Suzuki K Poulose <Suzuki.Poulose@arm.com> - 2016-04-27 11:10 +0200

#1388151 — [PATCH V4 12/18] coresight: tmc: dump system memory content only when needed

FromMathieu Poirier <mathieu.poirier@linaro.org>
Date2016-04-27 00:20 +0200
Subject[PATCH V4 12/18] coresight: tmc: dump system memory content only when needed
Message-ID<rsjuO-75I-19@gated-at.bofh.it>
Calling tmc_etf/etr_dump_hw() is required only when operating from
sysFS.  When working from Perf, the system memory is harvested
from the AUX trace API.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
 drivers/hwtracing/coresight/coresight-tmc-etf.c | 7 ++++++-
 drivers/hwtracing/coresight/coresight-tmc-etr.c | 7 ++++++-
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tmc-etf.c b/drivers/hwtracing/coresight/coresight-tmc-etf.c
index bc0efc1e5b49..b5e5e6ac67eb 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-etf.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-etf.c
@@ -74,7 +74,12 @@ static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata)
 	CS_UNLOCK(drvdata->base);
 
 	tmc_flush_and_stop(drvdata);
-	tmc_etb_dump_hw(drvdata);
+	/*
+	 * When operating in sysFS mode the content of the buffer needs to be
+	 * read before the TMC is disabled.
+	 */
+	if (local_read(&drvdata->mode) == CS_MODE_SYSFS)
+		tmc_etb_dump_hw(drvdata);
 	tmc_disable_hw(drvdata);
 
 	CS_LOCK(drvdata->base);
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c
index 0c107811a232..7208584d0da7 100644
--- a/drivers/hwtracing/coresight/coresight-tmc-etr.c
+++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c
@@ -76,7 +76,12 @@ static void tmc_etr_disable_hw(struct tmc_drvdata *drvdata)
 	CS_UNLOCK(drvdata->base);
 
 	tmc_flush_and_stop(drvdata);
-	tmc_etr_dump_hw(drvdata);
+	/*
+	 * When operating in sysFS mode the content of the buffer needs to be
+	 * read before the TMC is disabled.
+	 */
+	if (local_read(&drvdata->mode) == CS_MODE_SYSFS)
+		tmc_etr_dump_hw(drvdata);
 	tmc_disable_hw(drvdata);
 
 	CS_LOCK(drvdata->base);
-- 
2.5.0

[toc] | [next] | [standalone]


#1388815 — Re: [PATCH V4 12/18] coresight: tmc: dump system memory content only when needed

FromSuzuki K Poulose <Suzuki.Poulose@arm.com>
Date2016-04-27 11:10 +0200
SubjectRe: [PATCH V4 12/18] coresight: tmc: dump system memory content only when needed
Message-ID<rstDQ-779-15@gated-at.bofh.it>
In reply to#1388151
On 26/04/16 23:10, Mathieu Poirier wrote:
> Calling tmc_etf/etr_dump_hw() is required only when operating from
> sysFS.  When working from Perf, the system memory is harvested
> from the AUX trace API.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web