From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Hounschell Subject: Re: [PATCH v6 1/3] iommu: Implement common IOMMU ops for DMA mapping Date: Fri, 30 Oct 2015 14:18:27 -0400 Message-ID: <5633B473.9070605@compro.net> References: <1445867094.30736.14.camel@mhfsdcap03> <562E5AE4.9070001@arm.com> <20151030140923.GJ27420@8bytes.org> Reply-To: markh-n2QNKt385d+sTnJN9+BGXg@public.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20151030140923.GJ27420-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On 10/30/2015 10:09 AM, Joerg Roedel wrote: > On Fri, Oct 30, 2015 at 09:17:52AM +0800, Daniel Kurtz wrote: >> Hmm, I thought the DMA API maps a (possibly) non-contiguous set of >> memory pages into a contiguous block in device memory address space. >> This would allow passing a dma mapped buffer to device dma using just >> a device address and length. > > If you are speaking of the dma_map_sg interface, than there is absolutly > no guarantee from the API side that the buffers you pass in will end up > mapped contiguously. > IOMMU drivers handle this differently, and when there is no IOMMU at all > there is also no way to map these buffers together. > That is what CMA is for ya know. It makes it physically contiguous. Mark