Thread (1 message) 1 message, 1 author, 2013-02-07

[PATCH 2/5] spi: pl022: use generic DMA slave configuration if possible

From: arnd@arndb.de (Arnd Bergmann)
Date: 2013-02-07 19:42:54
Also in: linux-devicetree, linux-spi

On Thursday 07 February 2013, Linus Walleij wrote:
On Tue, Jan 29, 2013 at 2:13 PM, Arnd Bergmann [off-list ref] wrote:
quoted
On Tuesday 29 January 2013, Andy Shevchenko wrote:
quoted
quoted
quoted
+   pl022->dummypage = kmalloc(PAGE_SIZE, GFP_KERNEL);
Where this memory will be freed?
In dependence of the answer could you consider to use
devm_kmalloc or __get_free_page?
There is another function like this called pl022_dma_probe()
that has the same allocation, and it gets freed in the same place.

It's probably worth changing this into something different, but
I felt that it didn't belong into this patch. I was also not
sure if the best option would be dmam_alloc_coherent, dev_kzalloc,
or __get_free_page.
Actually I once read about a feature where the kernel provides
a static page full of zeroes or something like this, that would be
ideal to use in cases like this, then all of this dummy page
allocation and freeing can be deleted.
You mean empty_zero_page? That only works if this page is
read-only from the perspective of the DMA controller, but
then it would be a good fit, yes.

	Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help