Does kmalloc on MPC82xx work correctly with GFP_DMA?

Dan Malek dan at embeddededge.com
Tue Oct 19 01:31:12 EST 2004


On Oct 18, 2004, at 5:30 AM, Conor McLoughlin wrote:

> I have been looking at the ethernet device driver (fcc_enet) for the
> mpc82xx platform. This allocates buffer descriptors using kmalloc with
> the GFP_DMA flag.

Yes.

>  As far as I can see on my platform, this allocates
> from the regular kernel memory (0xCxxxxxxx). As the attributes of this
> block of memory are controlled by the block address translation
> registers,

No, the kmalloc() space is not covered by BATs (but, that isn't
relevant for this discussion).

>  this cannot be DMA safe, can it?

Yes, it is DMA safe.  That's why this driver works :-)

	-- Dan




More information about the Linuxppc-embedded mailing list