diff options
| author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2016-05-03 13:33:55 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-03 17:59:30 -0400 |
| commit | a40318fb01e98e72175bd9891208541148633d42 (patch) | |
| tree | 905da38f3b55b953860c374b993e6905e9654924 /drivers/hwtracing | |
| parent | f2facc3366d77e78dbc8bf865f1e4a6227a7f0e5 (diff) | |
coresight: tmc: dump system memory content only when needed
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing')
| -rw-r--r-- | drivers/hwtracing/coresight/coresight-tmc-etf.c | 7 | ||||
| -rw-r--r-- | 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) | |||
| 74 | CS_UNLOCK(drvdata->base); | 74 | CS_UNLOCK(drvdata->base); |
| 75 | 75 | ||
| 76 | tmc_flush_and_stop(drvdata); | 76 | tmc_flush_and_stop(drvdata); |
| 77 | tmc_etb_dump_hw(drvdata); | 77 | /* |
| 78 | * When operating in sysFS mode the content of the buffer needs to be | ||
| 79 | * read before the TMC is disabled. | ||
| 80 | */ | ||
| 81 | if (local_read(&drvdata->mode) == CS_MODE_SYSFS) | ||
| 82 | tmc_etb_dump_hw(drvdata); | ||
| 78 | tmc_disable_hw(drvdata); | 83 | tmc_disable_hw(drvdata); |
| 79 | 84 | ||
| 80 | CS_LOCK(drvdata->base); | 85 | 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) | |||
| 76 | CS_UNLOCK(drvdata->base); | 76 | CS_UNLOCK(drvdata->base); |
| 77 | 77 | ||
| 78 | tmc_flush_and_stop(drvdata); | 78 | tmc_flush_and_stop(drvdata); |
| 79 | tmc_etr_dump_hw(drvdata); | 79 | /* |
| 80 | * When operating in sysFS mode the content of the buffer needs to be | ||
| 81 | * read before the TMC is disabled. | ||
| 82 | */ | ||
| 83 | if (local_read(&drvdata->mode) == CS_MODE_SYSFS) | ||
| 84 | tmc_etr_dump_hw(drvdata); | ||
| 80 | tmc_disable_hw(drvdata); | 85 | tmc_disable_hw(drvdata); |
| 81 | 86 | ||
| 82 | CS_LOCK(drvdata->base); | 87 | CS_LOCK(drvdata->base); |
