Re: Bugs in usb-skeleton.c??? :)

From: Manuel Lauss
Date: Thu Jul 13 2006 - 10:24:07 EST


On Thu, Jul 13, 2006 at 05:10:20PM +0400, Sergej Pupykin wrote:
> >> Does kmalloc always allocate pages that can be used in DMA?
>
> AvdV> normally yes. HOWEVER....
>
> I use sh4 cpu...

on SH-4 traditionally the whole memory space is mapped all the
time, so any space returned by kmalloc is DMA-able.
(I don't know if this applies to the SH-4A core, too)

> AvdV> ..it is nicer to use the DMA allocation API (which internally may fall
> AvdV> back to kmalloc etc), while kmalloc may work, it can be quite slow in
> AvdV> how it's made to work. So it's just nicer to just use the DMA memory
> AvdV> allocators... (see Documentation/DMA-API.txt file for a description of
> AvdV> this)

agree

--
ml.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/