Even in that case you should actually use "bus_to_virt()". The driver
knows only the "bus address" that it used for the access (which _tends_ to
be the same as the physical address of the memory location in question,
but at least in theory it doesn't need to be, and there are some rather
strange PCI implementations where physical memory is mapped in the PCI
space to another location than zero - it makes sense when you think about
the ISA legacy region, and separating a bus transaction to 640k-1MB ISA
memory from the 640kB-1M RAM region on a chip where PCI and RAM are not
overlapped like they are on intel).
The ONLY valid use for "phys_to_virt()" and friends is inside the memory
management. Nowhere else is it really valid.
Linus
-
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/