diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2015-01-16 18:47:19 -0500 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2015-01-19 09:19:31 -0500 |
commit | 6fd492fd746d9858a41dc85eef44bd627b809109 (patch) | |
tree | 0010c12f0fb4ce2d4b402b9dc6dfa1d0e9dadbef /drivers/iommu/iommu.c | |
parent | 0fb5fe874c42942e16c450ae05da453e13a1c09e (diff) |
iommu: Fix trace_unmap() to report original iova
iommu_unmap() calls trace_unmap() with changed iova and original
size. trace_unmap() should report original iova instead. Change
iommu_unmap() to call trace_unmap() with original iova.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Reported-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/iommu.c')
-rw-r--r-- | drivers/iommu/iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index f7718d73e984..d4c3db5abf25 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c | |||
@@ -1094,6 +1094,7 @@ size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t size) | |||
1094 | { | 1094 | { |
1095 | size_t unmapped_page, unmapped = 0; | 1095 | size_t unmapped_page, unmapped = 0; |
1096 | unsigned int min_pagesz; | 1096 | unsigned int min_pagesz; |
1097 | unsigned long orig_iova = iova; | ||
1097 | 1098 | ||
1098 | if (unlikely(domain->ops->unmap == NULL || | 1099 | if (unlikely(domain->ops->unmap == NULL || |
1099 | domain->ops->pgsize_bitmap == 0UL)) | 1100 | domain->ops->pgsize_bitmap == 0UL)) |
@@ -1133,7 +1134,7 @@ size_t iommu_unmap(struct iommu_domain *domain, unsigned long iova, size_t size) | |||
1133 | unmapped += unmapped_page; | 1134 | unmapped += unmapped_page; |
1134 | } | 1135 | } |
1135 | 1136 | ||
1136 | trace_unmap(iova, 0, size); | 1137 | trace_unmap(orig_iova, 0, size); |
1137 | return unmapped; | 1138 | return unmapped; |
1138 | } | 1139 | } |
1139 | EXPORT_SYMBOL_GPL(iommu_unmap); | 1140 | EXPORT_SYMBOL_GPL(iommu_unmap); |