Re: pci in arch/powerpc vs arch/ppc
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-08-12 19:49:26
On Thu, 2007-08-09 at 17:56 +0200, Segher Boessenkool wrote:
quoted
It means the bus on which legacy I/O ports can be found. It's a fairly broken concept; each host bridge should really be treated as a completely separate entity, and if something like a VGA card has legacy I/O ports that need to be used, they should be looked for on the same PCI bus as the card itself. Legacy ISA ports should be discovered through the device tree (or platform devices, or whatever) that explicitly state which PCI-to-ISA bridge they're under.Currently, Linux does not allow multiple PCI domains to use overlapping legacy I/O ranges. Yeah it's a pain.
I have a plan I exposed a little while ago to handle that. We need that for VGA cards among others anyway. The idea is basically a call around the lines of pci_convert_legacy_resource(struct resource *r); You fill up the resource with flags = MEM/IO and start/end being your legacy range, and it returns a "fixed" resource that you can use with inX/outX, or whatever else. Haven't had time to code something up, and we need to provide a default impl. for all archs too ... but feel free to volunteer and beat me to it :-) Ben.