From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail6.bemta8.messagelabs.com (mail6.bemta8.messagelabs.com [216.82.243.55]) by kanga.kvack.org (Postfix) with ESMTP id 42A389000C4 for ; Tue, 20 Sep 2011 16:11:35 -0400 (EDT) From: Krishna Reddy Date: Tue, 20 Sep 2011 13:11:20 -0700 Subject: Re: [PATCH 1/2] ARM: initial proof-of-concept IOMMU mapper for DMA-mapping Message-ID: <401E54CE964CD94BAE1EB4A729C7087E1229036BAC@HQMAIL04.nvidia.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Linux-ARM Kernel Cc: Marek Szyprowski , linaro-mm-sig , linux-mm , linux-arch , Shariq Hasnain , Arnd Bergmann , Joerg Roedel , Kyungmin Park , Andrzej Pietrasiewicz , Russell King - ARM Linux , Chunsang Jeong Hi, The following change fixes a bug, which causes releasing incorrect iova spa= ce, in the original patch of this mail thread. It fixes compilation error e= ither. 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 =3D size >> PAGE_SHIFT; int i; =20 - for (i=3D0; idomain, iova, 0); - iova +=3D PAGE_SIZE; - } + for (i=3D0; idomain, 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 scatt= erlist *sg, int nents, size +=3D sg->length; } __map_sg_chunk(dev, start, size, &dma->dma_address, dir); - d->dma_address +=3D offset; + dma->dma_address +=3D offset; =20 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: email@kvack.org