iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu: fix second argument of trace_map() to report correct paddr
@ 2016-02-10  1:18 Yoshihiro Shimoda
  2016-02-25 13:57 ` Joerg Roedel
  0 siblings, 1 reply; 2+ messages in thread
From: Yoshihiro Shimoda @ 2016-02-10  1:18 UTC (permalink / raw)
  To: joro; +Cc: iommu, linux-renesas-soc, Yoshihiro Shimoda

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>
---
 drivers/iommu/iommu.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 0e3b009..bfd4f7c 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -1314,6 +1314,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
 	unsigned long orig_iova = iova;
 	unsigned int min_pagesz;
 	size_t orig_size = size;
+	phys_addr_t orig_paddr = paddr;
 	int ret = 0;
 
 	if (unlikely(domain->ops->map == NULL ||
@@ -1358,7 +1359,7 @@ int iommu_map(struct iommu_domain *domain, unsigned long iova,
 	if (ret)
 		iommu_unmap(domain, orig_iova, orig_size - size);
 	else
-		trace_map(orig_iova, paddr, orig_size);
+		trace_map(orig_iova, orig_paddr, orig_size);
 
 	return ret;
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iommu: fix second argument of trace_map() to report correct paddr
  2016-02-10  1:18 [PATCH] iommu: fix second argument of trace_map() to report correct paddr Yoshihiro Shimoda
@ 2016-02-25 13:57 ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2016-02-25 13:57 UTC (permalink / raw)
  To: Yoshihiro Shimoda; +Cc: iommu, linux-renesas-soc

On Wed, Feb 10, 2016 at 10:18:04AM +0900, Yoshihiro Shimoda wrote:
> 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>
> ---
>  drivers/iommu/iommu.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-25 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-10  1:18 [PATCH] iommu: fix second argument of trace_map() to report correct paddr Yoshihiro Shimoda
2016-02-25 13:57 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).