iommu: Fix second argument of trace_map() to report correct paddr
Since iommu_map() code added pgsize value to the paddr, trace_map() used wrong paddr. So, this patch adds "orig_paddr" value in the iommu_map() to use for the trace_map(). Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
81f70ba233
commit
06bfcaa91f
1 changed files with 2 additions and 1 deletions
|
@ -1314,6 +1314,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
||||||
unsigned long orig_iova = iova;
|
unsigned long orig_iova = iova;
|
||||||
unsigned int min_pagesz;
|
unsigned int min_pagesz;
|
||||||
size_t orig_size = size;
|
size_t orig_size = size;
|
||||||
|
phys_addr_t orig_paddr = paddr;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
if (unlikely(domain->ops->map == NULL ||
|
if (unlikely(domain->ops->map == NULL ||
|
||||||
|
@ -1358,7 +1359,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
|
||||||
if (ret)
|
if (ret)
|
||||||
iommu_unmap(domain, orig_iova, orig_size - size);
|
iommu_unmap(domain, orig_iova, orig_size - size);
|
||||||
else
|
else
|
||||||
trace_map(orig_iova, paddr, orig_size);
|
trace_map(orig_iova, orig_paddr, orig_size);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue