__pa giving strange phys address on PPC

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Jan 8 11:25:08 EST 2009


On Wed, 2009-01-07 at 22:11 +0100, dibacco at libero.it wrote:
> I used __pa on the result of an uncached_mem_alloc. 

No idea what uncached_mem_alloc() is but if that uses the consistent
memory stuff it won't work with __pa.

> Furthermore __pa should work on the return of a kmalloc?

Yes. But don't use that, just use the dma allocation/mapping functions
instead, they return to you both the pa and the dma_addr_t. This is
better for -many- reasons.

Cheers,
Ben.





More information about the Linuxppc-dev mailing list