iommu: Change iommu driver to call unmap trace event
authorShuah Khan <shuah.kh@samsung.com>
Thu, 15 Aug 2013 17:59:29 +0000 (11:59 -0600)
committerJoerg Roedel <joro@8bytes.org>
Tue, 24 Sep 2013 10:35:26 +0000 (12:35 +0200)
Change iommu driver to call unmap trace event. This iommu_map_unmap class
event can be enabled to trigger when iommu unmap 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: unmap: IOMMU: iova=0x00000000cb800000 size=0x400

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/iommu.c

index ea49fe8140260944af6f0ff36a6b884fa7d24caa..d8c53c7a7ec18c43358396410f94721b8b96fb63 100644 (file)
@@ -892,6 +892,7 @@ size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t size)
                unmapped += unmapped_page;
        }
 
+       trace_unmap(iova, 0, size);
        return unmapped;
 }
 EXPORT_SYMBOL_GPL(iommu_unmap);