virt_to_phys, perhaps? /dev/mem isn't indexed by bus addresses. Of
course you've got to code them yourself, since they're kernel functions...
I suppose the X source would be definitive here.
For mmaping in the kernel, fbmem seems to be definitive - you use
io_remap_page_range, and pass in the *input* to ioremap, not the
output.
> Adrian> 2) Using the contents of base_address[] as a target address
> Adrian> for peer to peer DMA on PCI?
>
> Hmmm, interesting, I would say same answer as for 1).
I think the raw contents of the config registers would be appropriate here -
if you think about it, it's the actual address that the device is going to
decode. If you do various transforms and end up with another address (e.g.
if you have independent PCI buses) then all that tells you is that device-
to-device DMA isn't going to work.
-- ............................................................................ Peter Desnoyers 162 Pleasant St. (617) 661-1979 pjd@fred.cambridge.ma.us Cambridge, Mass. 02139 (978) 461-0402 (work) pjd@giga-net.com- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/