Re: PCI Express support for 2.4 kernel

Andi Kleen
2003-12-15T23:07:08Z

On Tue, Dec 16, 2003 at 12:48:49AM +0200, Vladimir Kondratiev wrote:

> My fist intention was exactly same as yours, but if all access were done
> through pci_dev...
> Unfortunately, you can't store ioremap()'ed address for 4k within
> pci_dev and then simply use it.
> In all places around, config accessed through (bus,dev,fn) indexes.

Just use a small binary tree or hash table to look up the pci_dev
given (bus,dev,fn). That will be much faster than playing with
mappings and flushing TLBs.

-Andi