On Tue, Jan 29, 2013 at 2:13 PM, Arnd Bergmann <a...@arndb.de> wrote:
> On Tuesday 29 January 2013, Andy Shevchenko wrote:

>> > +   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.

Yours,
Linus Walleij

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to