summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2015-06-05 17:10:00 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:12:47 -0700
commitd85c7f8f7cad50135463a6fd267d2d9a07ced00a (patch)
treeed46fc77ef03d607bafb39ab1c4732b9ab98eba9 /include/linux
parent85e70599b1508526f2ac314dbeeb76e7981a12f5 (diff)
iommu: add ftrace profiling for map and unmap
Add ftrace start and end logging for map, iommu_map_sg and unmap in order to facilitate performance testing. Change-Id: I9ddf241ffa6cf519f6abece7b0820640f5ce1975 Signed-off-by: Liam Mark <lmark@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iommu.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 2d835b7c226d..614363f84b38 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -262,7 +262,12 @@ static inline size_t iommu_map_sg(struct iommu_domain *domain,
unsigned long iova, struct scatterlist *sg,
unsigned int nents, int prot)
{
- return domain->ops->map_sg(domain, iova, sg, nents, prot);
+ size_t ret;
+
+ trace_map_sg_start(iova, nents);
+ ret = domain->ops->map_sg(domain, iova, sg, nents, prot);
+ trace_map_sg_end(iova, nents);
+ return ret;
}
extern int iommu_dma_supported(struct iommu_domain *domain, struct device *dev,