From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EB1DEDDF89 for ; Tue, 6 May 2008 21:27:23 +1000 (EST) Subject: Re: [PATCH] Sam440ep support From: Benjamin Herrenschmidt To: Takashi Iwai In-Reply-To: <1210073153.21644.175.camel@pasglop> References: <6DA6B1DA-11B5-4B89-88AD-561B4D17B33B@kernel.crashing.org> <20080505195054.172000@gmx.net> <1210031058.21644.120.camel@pasglop> <20080506075115.269150@gmx.net> <1210063719.21644.162.camel@pasglop> <20080506091622.269180@gmx.net> <1210068747.21644.164.camel@pasglop> <1210073153.21644.175.camel@pasglop> Content-Type: text/plain Date: Tue, 06 May 2008 21:27:14 +1000 Message-Id: <1210073234.21644.177.camel@pasglop> Mime-Version: 1.0 Cc: linuxppc-dev@ozlabs.org, cjg@cruxppc.org Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > Hrm... the problem is that you aren't supposed to make up sglists with > the result of dma_alloc_coherent... It might be a limitation of our core > DMA API, but that's we have to deal with today.. > > If you're going to make up sglists and call vmap, you should allocate > pages with normal GFP. If that is a problem vs. DMA'bility of those > pages, then ... we have a problem :-) > > I don't think we can easily update the DMA API at this stage. What we > could do is provide a way to retrieve the struct page array from the > result of dma_alloc_coherent... Another option is to allocate the pages with gfp, and then dma_map_sg the result... However, if we do that, we do need to add a way to vmap with the right protection in order to get a coherent (ie. non cacheable) mapping. I'm not even sure all archs can do that.... Ben.