Re: Multiple PCI busses (WAS:Re: performance downgrade on PowerPC)

From: David S. Miller (davem@redhat.com)
Date: Wed Jun 21 2000 - 09:08:44 EST


   From: Benjamin Herrenschmidt <bh40@calva.net>
   Date: Wed, 21 Jun 2000 15:23:36 +0200

   The way this is currently handled in Alpha is to remap everything
   and re- assign new bus numbers in order for them to be unique (and
   so "fake" a single root hierarchy). (Tell me if I'm wrong). I was
   thinking about implementing a similar mecanism for PPC, but now
   that we are also having x86 platforms with this problem, wouldn't
   it be better to re-design enough of Linux kernel PCI layer so that
   it can handle several separate busses (and so, several roots
   ?). This would require identifying them with an additional info in
   pci_dev (inside the kernel) and extending / proc/bus/pci
   significantly however.

I've already approached Linus about this several months ago,
sparc64 has the same issues.

His response is that an unsigned char and the "fake" bus hierarchy can
represent all cases we need to handle, and I honestly cannot disagree
with him, he is right. So I would not suggest to pursue this idea
much further.

On the other hand, dealing with the issues surrounding mmap'ing PCI
devices on these different busses is an issue that should be handled
because the 32-bit PCI base address register (plus some offset
perhaps) is not enough to uniquely map in the registers of a PCI
device in such configurations. This is a huge problem with PCI
graphics cards on sparc64 for example, because this issue does not
jive well with how all the xfree86 pci logic operates.

What I was thinking about, in order to address this whole issue, is to
provide a /dev/pcimmap like device, you open it, run an ioctl on it to
select a "bus, device, function, base address register" quadruple,
then at that point you can "mmap" that specific device area with some
offset from the base register indicated using the mmap offset
parameter.

This would solve one of the greatest problems us Sparc64 folks have
with making the PCI card drivers work nearly out of the box. It
will solve the alpha multi-hose issue as well.

Later,
David S. Miller
davem@redhat.com

-
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/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:21 EST