diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 1080f9acf70a3..7c9f12dd78948 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -23,6 +23,7 @@ #include #include #include +#include #define ADSP_DOMAIN_ID (0) #define MDSP_DOMAIN_ID (1) @@ -1585,6 +1586,13 @@ static int fastrpc_device_release(struct inode *inode, struct file *file) unsigned long flags; fastrpc_release_current_dsp_process(fl); + if (fl->sctx && fl->sctx->dev) { + struct iommu_domain *domain = + iommu_get_domain_for_dev(fl->sctx->dev); + + if (domain) + iommu_flush_iotlb_all(domain); + } spin_lock_irqsave(&cctx->lock, flags); list_del(&fl->user);