Re: The IO problem on multiple PCI busses

Benjamin Herrenschmidt (benh@kernel.crashing.org)
Sat, 3 Mar 2001 03:25:06 +0100


>No, don't do this, it is evil. Use mappings, specify the device
>related info somehow when creating the mapping (in the userspace
>variant you do this by openning a specific device to mmap, in the
>kernel variant you can encode the bus/dev/etc. info in the device's
>resource and decode this at ioremap() time, see?).

Well, except that drivers doing IOs don't ioremap...

Maybe we could define an ioremap-like function for IOs, but the more
we discuss this, the more I feel that for in-kernel, a simple function
that returns a per-bus io base (and another one for ISA mem) is plenty
enough for the few legacy things we have to deal with (mostly VGA).

For PCI drivers doing IOs, we just need to have the IO resource
structures to be properly fixed up (include the correct iobase already).

That iobase can either be a mix of a real io address and a "cooking" in
the high bits like parisc, or it can be an address ioremap'd in the
correct bus mapping when it's possible, or whatever...

Ben.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/