linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Krishna Reddy <vdumpa@nvidia.com>
To: Linux-ARM Kernel <linux-arm-kernel@lists.infradead.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
	linaro-mm-sig <linaro-mm-sig@lists.linaro.org>,
	linux-mm <linux-mm@kvack.org>,
	linux-arch <linux-arch@vger.kernel.org>,
	Shariq Hasnain <shariq.hasnain@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>, Joerg Roedel <joro@8bytes.org>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Andrzej Pietrasiewicz <andrzej.p@samsung.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Chunsang Jeong <chunsang.jeong@linaro.org>
Subject: Re: [PATCH 1/2] ARM: initial proof-of-concept IOMMU mapper for DMA-mapping
Date: Tue, 20 Sep 2011 13:11:20 -0700	[thread overview]
Message-ID: <401E54CE964CD94BAE1EB4A729C7087E1229036BAC@HQMAIL04.nvidia.com> (raw)

Hi,
The following change fixes a bug, which causes releasing incorrect iova space, in the original patch of this mail thread. It fixes compilation error either.

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 82d5134..8c16ed7 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -900,10 +900,8 @@ static int __iommu_remove_mapping(struct device *dev, dma_addr_t iova, size_t si
        unsigned int count = size >> PAGE_SHIFT;
        int i;
 
-       for (i=0; i<count; i++) {
-               iommu_unmap(mapping->domain, iova, 0);
-               iova += PAGE_SIZE;
-       }
+       for (i=0; i<count; i++)
+               iommu_unmap(mapping->domain, iova + i * PAGE_SIZE, 0);
        __free_iova(mapping, iova, size);
        return 0;
 }
@@ -1073,7 +1071,7 @@ int arm_iommu_map_sg(struct device *dev, struct scatterlist *sg, int nents,
                size += sg->length;
        }
        __map_sg_chunk(dev, start, size, &dma->dma_address, dir);
-       d->dma_address += offset;
+       dma->dma_address += offset;
 
        return count;


-nvpublic

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

             reply	other threads:[~2011-09-20 20:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-20 20:11 Krishna Reddy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-09-20 18:48 Krishna Reddy
2011-09-20 18:46 Krishna Reddy
2011-09-20 18:39 Krishna Reddy
2011-09-02 13:56 [RFC 0/2 v2] ARM: DMA-mapping & IOMMU integration Marek Szyprowski
2011-09-02 13:56 ` [PATCH 1/2] ARM: initial proof-of-concept IOMMU mapper for DMA-mapping Marek Szyprowski

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=401E54CE964CD94BAE1EB4A729C7087E1229036BAC@HQMAIL04.nvidia.com \
    --to=vdumpa@nvidia.com \
    --cc=andrzej.p@samsung.com \
    --cc=arnd@arndb.de \
    --cc=chunsang.jeong@linaro.org \
    --cc=joro@8bytes.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=shariq.hasnain@linaro.org \
    /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