Messages in this thread | | | Subject | Re: Specifying properly the PCI driver model on all linux architectur es, (ioremap(), bus_to_virt() ...) | From | Jes Sorensen <> | Date | 03 Nov 1999 11:28:27 +0100 |
| |
>>>>> "Adrian" == Adrian Cox <apc@agelectronics.co.uk> writes:
Adrian> But with multiple PCI buses, the base_address cannot be a Adrian> simple bus address, because the PCI bus number must be coded Adrian> in there. For example, on alpha the PCI_HANDLE from Adrian> include/asm-alpha/pci.h is or'ed into the base_address.
Adrian> As far as I can tell, the base_address[] is always correct for Adrian> ioremap. But are the following two tricks valid:
Thats my assumption and at least thats what I have been telling people so far ;-)
Adrian> 1) Using the contents of base_address[] as an offset when Adrian> mmapping /dev/mem from userspace?
I would probably go for using virt_to_bus(ioremap(base_address[])) here.
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).
By using this approach it should be safe for the boot sequence code to mangle base_address[] when you have multiple PCI busses and it will still be possible for ioremap() to do the right thing.
Jes
- 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/
| |