Thread (1 message) 1 message, 1 author, 2002-09-17

Re: problem with pci_alloc_consistent (it does work)

From: Matt Porter <hidden>
Date: 2002-09-17 23:16:51

On Tue, Sep 17, 2002 at 02:24:35PM -0400, Waqar Ahmad wrote:
Found the problem I was using phys_to_virt(..) to convert the
physical address to virtual. Once I fixed that everything seems
to be working now. so
Anybody confused by this should read and understand
Documentation/IO-mapping.txt.  virt_to_phys/phys_to_virt
and virt_to_bus/bus_to_virt are only defined for usage on
system memory.  This means statically mapped kernel memory.
The only way to reliably (cross platform) get a physical
address from pci_alloc_consistent is to hold on to your
dma_handle.  This has been covered a number of times on lkml
with DavidM and might even be in the current DMA-mapping.txt
by now...but I doubt it. :)

Regards,
--
Matt Porter
porter@cox.net
This is Linux Country. On a quiet night, you can hear Windows reboot.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help