From: Shuah Khan Date: Thu, 15 Aug 2013 17:59:28 +0000 (-0600) Subject: iommu: Change iommu driver to call map trace event X-Git-Tag: v3.13-rc1~79^2~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=e0be7c867882320b65714a4386760382196dc7e8;p=linux.git iommu: Change iommu driver to call map trace event Change iommu driver to call map trace event. This iommu_map_unmap class event can be enabled to trigger when iommu map iommu ops is called. Trace information includes iova, physical address (map event only), and size. Testing: Added trace calls to iommu_prepare_identity_map() for testing some of the conditions that are hard to trigger. Here is the trace from the testing: swapper/0-1 [003] .... 1.854102: map: IOMMU: iova=0x00000000cb800000 paddr=0x00000000cf9fffff size=0x400 Signed-off-by: Shuah Khan Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b6307545124c..ea49fe814026 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -842,6 +842,8 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova, /* unroll mapping in case something went wrong */ if (ret) iommu_unmap(domain, orig_iova, orig_size - size); + else + trace_map(iova, paddr, size); return ret; }