From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 11/13] mips,unicore32: swiotlb doesn't need sg->dma_length Date: Thu, 3 May 2018 05:56:43 +0200 Message-ID: <20180503035643.GA9781@lst.de> References: <20180425051539.1989-1-hch@lst.de> <20180425051539.1989-12-hch@lst.de> <20180502222017.GC20766@jamesdev> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20180502222017.GC20766@jamesdev> 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: James Hogan Cc: linux-mips-6z/3iImG2C8G8FEW9MqTrA@public.gmane.org, sstabellini-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, Konrad Rzeszutek Wilk , linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, sparclinux-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Christoph Hellwig , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Wed, May 02, 2018 at 11:20:18PM +0100, James Hogan wrote: > On Wed, Apr 25, 2018 at 07:15:37AM +0200, Christoph Hellwig wrote: > > Only mips and unicore32 select CONFIG_NEED_SG_DMA_LENGTH when building > > swiotlb. swiotlb itself never merges segements and doesn't accesses the > > dma_length field directly, so drop the dependency. > > Is that at odds with Documentation/DMA-API-HOWTO.txt, which seems to > suggest arch ports should enable it for IOMMUs? swiotlb isn't really an iommu.. That being said iommus don't have to merge segments either if they don't want to, and we have various implementations that don't. The whole dma api documentation needs a major overhaul, including merging the various files and dropping a lot of dead wood. It has been on my todo list for a while, with an inner hope that someone else would do it before me. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: with ECARTIS (v1.0.0; list linux-mips); Thu, 03 May 2018 05:54:09 +0200 (CEST) Received: from verein.lst.de ([213.95.11.211]:60790 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by eddie.linux-mips.org with ESMTP id S23992212AbeECDyDhtuO2 (ORCPT ); Thu, 3 May 2018 05:54:03 +0200 Received: by newverein.lst.de (Postfix, from userid 2407) id 6584068CF4; Thu, 3 May 2018 05:56:43 +0200 (CEST) Date: Thu, 3 May 2018 05:56:43 +0200 From: Christoph Hellwig To: James Hogan Cc: Christoph Hellwig , Konrad Rzeszutek Wilk , iommu@lists.linux-foundation.org, sstabellini@kernel.org, x86@kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, linux-mips@linux-mips.org, sparclinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 11/13] mips,unicore32: swiotlb doesn't need sg->dma_length Message-ID: <20180503035643.GA9781@lst.de> References: <20180425051539.1989-1-hch@lst.de> <20180425051539.1989-12-hch@lst.de> <20180502222017.GC20766@jamesdev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180502222017.GC20766@jamesdev> User-Agent: Mutt/1.5.17 (2007-11-01) Return-Path: X-Envelope-To: <"|/home/ecartis/ecartis -s linux-mips"> (uid 0) X-Orcpt: rfc822;linux-mips@linux-mips.org Original-Recipient: rfc822;linux-mips@linux-mips.org X-archive-position: 63854 X-ecartis-version: Ecartis v1.0.0 Sender: linux-mips-bounce@linux-mips.org Errors-to: linux-mips-bounce@linux-mips.org X-original-sender: hch@lst.de Precedence: bulk List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: linux-mips X-List-ID: linux-mips List-subscribe: List-owner: List-post: List-archive: X-list: linux-mips On Wed, May 02, 2018 at 11:20:18PM +0100, James Hogan wrote: > On Wed, Apr 25, 2018 at 07:15:37AM +0200, Christoph Hellwig wrote: > > Only mips and unicore32 select CONFIG_NEED_SG_DMA_LENGTH when building > > swiotlb. swiotlb itself never merges segements and doesn't accesses the > > dma_length field directly, so drop the dependency. > > Is that at odds with Documentation/DMA-API-HOWTO.txt, which seems to > suggest arch ports should enable it for IOMMUs? swiotlb isn't really an iommu.. That being said iommus don't have to merge segments either if they don't want to, and we have various implementations that don't. The whole dma api documentation needs a major overhaul, including merging the various files and dropping a lot of dead wood. It has been on my todo list for a while, with an inner hope that someone else would do it before me. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Date: Thu, 03 May 2018 03:56:43 +0000 Subject: Re: [PATCH 11/13] mips,unicore32: swiotlb doesn't need sg->dma_length Message-Id: <20180503035643.GA9781@lst.de> List-Id: References: <20180425051539.1989-1-hch@lst.de> <20180425051539.1989-12-hch@lst.de> <20180502222017.GC20766@jamesdev> In-Reply-To: <20180502222017.GC20766@jamesdev> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On Wed, May 02, 2018 at 11:20:18PM +0100, James Hogan wrote: > On Wed, Apr 25, 2018 at 07:15:37AM +0200, Christoph Hellwig wrote: > > Only mips and unicore32 select CONFIG_NEED_SG_DMA_LENGTH when building > > swiotlb. swiotlb itself never merges segements and doesn't accesses the > > dma_length field directly, so drop the dependency. > > Is that at odds with Documentation/DMA-API-HOWTO.txt, which seems to > suggest arch ports should enable it for IOMMUs? swiotlb isn't really an iommu.. That being said iommus don't have to merge segments either if they don't want to, and we have various implementations that don't. The whole dma api documentation needs a major overhaul, including merging the various files and dropping a lot of dead wood. It has been on my todo list for a while, with an inner hope that someone else would do it before me. From mboxrd@z Thu Jan 1 00:00:00 1970 From: hch@lst.de (Christoph Hellwig) Date: Thu, 3 May 2018 05:56:43 +0200 Subject: [PATCH 11/13] mips,unicore32: swiotlb doesn't need sg->dma_length In-Reply-To: <20180502222017.GC20766@jamesdev> References: <20180425051539.1989-1-hch@lst.de> <20180425051539.1989-12-hch@lst.de> <20180502222017.GC20766@jamesdev> Message-ID: <20180503035643.GA9781@lst.de> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, May 02, 2018 at 11:20:18PM +0100, James Hogan wrote: > On Wed, Apr 25, 2018 at 07:15:37AM +0200, Christoph Hellwig wrote: > > Only mips and unicore32 select CONFIG_NEED_SG_DMA_LENGTH when building > > swiotlb. swiotlb itself never merges segements and doesn't accesses the > > dma_length field directly, so drop the dependency. > > Is that at odds with Documentation/DMA-API-HOWTO.txt, which seems to > suggest arch ports should enable it for IOMMUs? swiotlb isn't really an iommu.. That being said iommus don't have to merge segments either if they don't want to, and we have various implementations that don't. The whole dma api documentation needs a major overhaul, including merging the various files and dropping a lot of dead wood. It has been on my todo list for a while, with an inner hope that someone else would do it before me.