@@ -84,7 +84,9 @@ static void __tmc_etb_disable_hw(struct tmc_drvdata *drvdata)
{
CS_UNLOCK(drvdata->base);
- tmc_flush_and_stop(drvdata);
+ if (tmc_flush_and_stop(drvdata))
+ dev_err(&drvdata->csdev->dev,
+ "Flush and stop error disabling ETB\n");
/*
* When operating in sysFS mode the content of the buffer needs to be
* read before the TMC is disabled.
@@ -146,7 +148,9 @@ static void tmc_etf_disable_hw(struct tmc_drvdata *drvdata)
CS_UNLOCK(drvdata->base);
- tmc_flush_and_stop(drvdata);
+ if (tmc_flush_and_stop(drvdata))
+ dev_err(&drvdata->csdev->dev,
+ "Flush and stop error disabling ETF\n");
tmc_disable_hw(drvdata);
coresight_disclaim_device_unlocked(csdev);
CS_LOCK(drvdata->base);
@@ -492,7 +496,9 @@ static unsigned long tmc_update_etf_buffer(struct coresight_device *csdev,
CS_UNLOCK(drvdata->base);
- tmc_flush_and_stop(drvdata);
+ if (tmc_flush_and_stop(drvdata))
+ dev_err(&drvdata->csdev->dev,
+ "Flush and stop error updating perf buffer\n");
read_ptr = tmc_read_rrp(drvdata);
write_ptr = tmc_read_rwp(drvdata);
@@ -1145,7 +1145,9 @@ static void __tmc_etr_disable_hw(struct tmc_drvdata *drvdata)
{
CS_UNLOCK(drvdata->base);
- tmc_flush_and_stop(drvdata);
+ if (tmc_flush_and_stop(drvdata))
+ dev_err(&drvdata->csdev->dev,
+ "Flush and stop error disabling ETR\n");
/*
* When operating in sysFS mode the content of the buffer needs to be
* read before the TMC is disabled.
@@ -1548,7 +1550,9 @@ tmc_update_etr_buffer(struct coresight_device *csdev,
CS_UNLOCK(drvdata->base);
- tmc_flush_and_stop(drvdata);
+ if (tmc_flush_and_stop(drvdata))
+ dev_err(&csdev->dev,
+ "Flush and Stop error updating perf buffer\n");
tmc_sync_etr_buf(drvdata);
CS_LOCK(drvdata->base);
Insert additional context around tmc_flush_and_stop() errors. Signed-off-by: Mike Leach <mike.leach@linaro.org> --- drivers/hwtracing/coresight/coresight-tmc-etf.c | 12 +++++++++--- drivers/hwtracing/coresight/coresight-tmc-etr.c | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-)