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>
This commit is contained in:
parent
f2facc3366
commit
a40318fb01
|
@ -74,7 +74,12 @@ static void tmc_etb_disable_hw(struct tmc_drvdata *drvdata)
|
||||||
CS_UNLOCK(drvdata->base);
|
CS_UNLOCK(drvdata->base);
|
||||||
|
|
||||||
tmc_flush_and_stop(drvdata);
|
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);
|
tmc_disable_hw(drvdata);
|
||||||
|
|
||||||
CS_LOCK(drvdata->base);
|
CS_LOCK(drvdata->base);
|
||||||
|
|
|
@ -76,7 +76,12 @@ static void tmc_etr_disable_hw(struct tmc_drvdata *drvdata)
|
||||||
CS_UNLOCK(drvdata->base);
|
CS_UNLOCK(drvdata->base);
|
||||||
|
|
||||||
tmc_flush_and_stop(drvdata);
|
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);
|
tmc_disable_hw(drvdata);
|
||||||
|
|
||||||
CS_LOCK(drvdata->base);
|
CS_LOCK(drvdata->base);
|
||||||
|
|
Loading…
Reference in New Issue