On Wed, 18 Apr 2018 16:22:19 +0100 Suzuki K Poulose Suzuki.Poulose@arm.com wrote:
On 14/04/18 00:15, Kim Phillips wrote:
diff --git a/drivers/hwtracing/coresight/coresight-dynamic-replicator.c b/drivers/hwtracing/coresight/coresight-dynamic-replicator.c +MODULE_AUTHOR("Suzuki K Poulose suzuki.poulose@arm.com");
I just renamed the file, didn't author this driver. May be it was Pratik who wrote the original version.
Thanks, changed to Pratik, based on this commit:
commit 620cf787c121f39b5223e43bad3d1b7c66ecead5 Author: Pratik Patel pratikp@codeaurora.org Date: Tue May 19 10:55:21 2015 -0600
coresight: replicator: Add Qualcomm CoreSight Replicator driver
diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c +static int __exit tmc_remove(struct amba_device *adev) +{
- struct tmc_drvdata *drvdata = dev_get_drvdata(&adev->dev);
- misc_deregister(&drvdata->miscdev);
- coresight_unregister(drvdata->csdev);
- return 0;
+}
I think we may need to free the "buffer" used by the TMC-ETR if it is lying around to be collected for sysfs mode.
You mean:
misc_deregister->tmc_release->tmc_read_unprepare->tmc_read_unprepare_etr->dma_free_coherent ^ this 'release' call doesn't occur?
OK, so something like this will hopefully fix it?:
diff --git a/drivers/hwtracing/coresight/coresight-tmc.c b/drivers/hwtracing/coresight/coresight-tmc.c index 553885db2daa..7e7a19a22368 100644 --- a/drivers/hwtracing/coresight/coresight-tmc.c +++ b/drivers/hwtracing/coresight/coresight-tmc.c @@ -441,6 +441,10 @@ static int __exit tmc_remove(struct amba_device *adev) { struct tmc_drvdata *drvdata = dev_get_drvdata(&adev->dev);
+ if (drvdata->vaddr) + dma_free_coherent(drvdata->dev, drvdata->size, + drvdata->vaddr, drvdata->paddr); + misc_deregister(&drvdata->miscdev); coresight_unregister(drvdata->csdev);
I'll test tomorrow.
Mathieu, assuming that goes well, what are the next steps? Also, does patch 4/4 need better rationale text? If so, what is it?
Thanks,
Kim