lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 13 May 2010 15:21:43 +0900
From:	Paul Mundt <lethal@...ux-sh.org>
To:	Pekka Enberg <penberg@...helsinki.fi>
Cc:	Mike Frysinger <vapier.adi@...il.com>,
	Christoph Lameter <cl@...ux.com>,
	Matt Mackall <mpm@...enic.com>,
	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Oskar Schirmer <os@...ix.com>,
	Michael Hennerich <Michael.Hennerich@...log.com>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Daniel Gl??ckner <dg@...ix.com>,
	Oliver Schneidewind <osw@...ix.com>,
	Johannes Weiner <jw@...ix.com>, Nick Piggin <npiggin@...e.de>,
	David Rientjes <rientjes@...gle.com>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH v3] ad7877: keep dma rx buffers in seperate cache lines

On Tue, May 11, 2010 at 11:47:20PM +0300, Pekka Enberg wrote:
> Mike Frysinger wrote:
> >On Tue, May 11, 2010 at 16:38, Pekka Enberg wrote:
> >>Mike Frysinger wrote:
> >>>that is a question for David/Grant.  i'm not the SPI core maintainer,
> >>>i'm merely watching over some SPI drivers.  however, this answer also
> >>>doesnt sound like it's thinking big enough because what you're
> >>>proposing isnt specific to the SPI bus -- any time a DMA safe buffer
> >>>is needed dynamically, this function could be used.
> >>Well, we have dma_alloc_coherent(), shouldn't you be using that instead?
> >
> >my understanding is that dma_alloc_coherent() gives you a buffer that
> >is always coherent.  the SPI layers take care of flushing and such on
> >the fly which means allocating coherent memory is overkill and bad for
> >performance.
> 
> OK, I'm out of my expert area here but if dma_alloc_coherent() doesn't 
> work for you, you should probably extend the DMA API, not kmalloc().
> 
Note that the DMA API already has dma_alloc_noncoherent() for these
sorts of cases. If the driver is taking care of cache maintenance then
dma_alloc_noncoherent() is certainly a reasonable way to go.

Most architectures today simply wrap dma_alloc_noncoherent() to
dma_alloc_coherent(), but if there were more users of the API then
that would quickly change.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ