Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2ea1db6 authored by Mulu He's avatar Mulu He
Browse files

coresight: tmc: Fix mem size can't change issue



The sysfs interface "mem_size" is not workable due to drvdata->vaddr is
valiid. When the mem size changed by userspace, the memory did not
re-allocated. To fix this free allocated memory when ETR sink is disabled.

Change-Id: I3a8b85408a60c4f54a2ff5b6ac83236ed1c985c5
Signed-off-by: default avatarMulu He <muluhe@codeaurora.org>
parent c6d1686e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -966,6 +966,7 @@ static void tmc_disable_etr_sink(struct coresight_device *csdev)
		coresight_cti_unmap_trigin(drvdata->cti_reset, 2, 0);
		coresight_cti_unmap_trigout(drvdata->cti_flush, 3, 0);
		tmc_etr_byte_cntr_stop(drvdata->byte_cntr);
		tmc_etr_free_mem(drvdata);
	}
out:
	mutex_unlock(&drvdata->mem_lock);