public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Shuah Khan <shuahkh@osg.samsung.com>
Cc: alex.williamson@redhat.com, iommu@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iommu: fix trace_unmap() to report original iova
Date: Mon, 19 Jan 2015 15:04:01 +0100	[thread overview]
Message-ID: <20150119140400.GN6343@8bytes.org> (raw)
In-Reply-To: <1421452039-7646-1-git-send-email-shuahkh@osg.samsung.com>

On Fri, Jan 16, 2015 at 04:47:19PM -0700, Shuah Khan wrote:
> 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>
> ---
>  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 fbf8827..2eb7554 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)
>  {
>  	size_t unmapped_page, unmapped = 0;
>  	unsigned int min_pagesz;
> +	unsigned long orig_iova = iova;

Instead of adding another variable I think it is better to just move the
trace_unmap call before the unmap loop. It can actually replace the
pr_debug there.


	Joerg


  reply	other threads:[~2015-01-19 14:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-16 23:47 [PATCH] iommu: fix trace_unmap() to report original iova Shuah Khan
2015-01-19 14:04 ` Joerg Roedel [this message]
2015-01-19 14:21   ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150119140400.GN6343@8bytes.org \
    --to=joro@8bytes.org \
    --cc=alex.williamson@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shuahkh@osg.samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox