From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH] mips: Add dma_mmap_coherent() Date: Fri, 22 Aug 2008 16:47:45 +0200 Message-ID: References: <1219255088.3258.45.camel@localhost.localdomain> <1219326912.3265.2.camel@localhost.localdomain> <20080821214118.GA12516@alpha.franken.de> <20080822094131.GA6717@alpha.franken.de> <20080822143622.GA8413@alpha.franken.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: ralf@linux-mips.org, James Bottomley , linux-mips@linux-mips.org, Parisc List To: tsbogend@alpha.franken.de (Thomas Bogendoerfer) Return-path: In-Reply-To: <20080822143622.GA8413@alpha.franken.de> List-ID: List-Id: linux-parisc.vger.kernel.org At Fri, 22 Aug 2008 16:36:22 +0200, Thomas Bogendoerfer wrote: > > On Fri, Aug 22, 2008 at 12:23:48PM +0200, Takashi Iwai wrote: > > unsigned long prot = pgprot_val(_prot) & ~_CACHE_MASK; > > #ifdef CONFIG_SGI_IP32 > > #ifdef CONFIG_CPU_R10000 > > prot = prot | _CACHE_UNCACHED_ACCELERATED; > > #else > > prot = prot | _CACHE_CACHABLE_NO_WA; > > #endif > > #else > > prot = prot | _CACHE_UNCACHED; > > #endif > > return __pgprot(prot); > > this won't work for recording channels on IP32, because the write trough > mapping will hide updates done via DMA. Hmm, not so easy... > I'd start with just > > prot |= _CACHE_UNCACHED > > and if some MIPS system needs more specific treatment, we just add > that later. OK, then it's essentially pgprog_noncached() as in my second patch. Thanks! Takashi