Return-Path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by ozlabs.org (Postfix) with ESMTP id 1DF5EB6F8D for ; Fri, 25 Mar 2011 20:13:38 +1100 (EST) Date: Fri, 25 Mar 2011 10:13:34 +0100 Message-ID: From: Takashi Iwai To: Benjamin Herrenschmidt Subject: Re: [PATCH] powerpc: Implement dma_mmap_coherent() In-Reply-To: <1301044317.2402.475.camel@pasglop> References: <1301035806.2402.470.camel@pasglop> <1301044317.2402.475.camel@pasglop> MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: linuxppc-dev List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , At Fri, 25 Mar 2011 20:11:57 +1100, Benjamin Herrenschmidt wrote: > > On Fri, 2011-03-25 at 09:06 +0100, Takashi Iwai wrote: > > > @@ -52,6 +53,7 @@ extern void __dma_sync_page(struct page *page, > > unsigned long offset, > > > #define __dma_free_coherent(size, addr) ((void)0) > > > #define __dma_sync(addr, size, rw) ((void)0) > > > #define __dma_sync_page(pg, off, sz, rw) ((void)0) > > > +#define __dma_get_coherent_pfn(cpu_addr) (0) > > > > Just nitpicking: shouldn't we define some real thing like > > page_to_pfn(virt_to_page(cpu_addr)) > > or put something to trigger an error? Setting a bogus zero can be > > easily overlooked, I'm afraid. > > Yes, all those variants are bogus if you noticed :-) The trick is that > they aren't actually called when CONFIG_NOT_COHERENT_CACHE is not set > anyways, with the exception of __dma_sync(), so I want to just remove > them all. But I'll do that in a separate patch. OK, that makes sense. thanks, Takashi