Re: The IO problem on multiple PCI busses

Dan Malek
2001-03-01T20:03:14Z

"David S. Miller" wrote:

> There is only one sticking point, and that is how to convey to the
> mmap() call whether you want I/O or Memory space.

Isn't I/O space obsolete by now :-)? It actually caused me to think
of something else....I have cards with multiple memory and I/O
spaces (rare, but I have them). What if we did:

/proc/bus/pci/${BUS}/${DEVICE}/mem
/proc/bus/pci/${BUS}/${DEVICE}/io
/proc/bus/pci/${BUS}/${DEVICE}/BARn

The 'mem' or 'io' would map the first instance of these spaces
on the device, and would probably be suitable for nearly all devices.
If you really knew what you were doing (or wanted to make a big mess),
you could use the 'BARn' to specify the area.

You could even do something like map in as much virtually contiguous
space as indicated in the mmap(). For example, if the card has 2M I/O
and 8 M memory (in this order), the first 2M of the mmap()'ed space
would the the I/O and the next 8M would be the memory. I know, some
cards lie about the actual amount of space they have or need, but it
was just another idea that popped in.......

Thanks.

-- Dan