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

From: Benjamin Herrenschmidt (bh40@calva.net)
Date: Wed Jun 21 2000 - 09:55:22 EST


On Wed, Jun 21, 2000, David S. Miller <davem@redhat.com> wrote:

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

That would indeed be even better than the syscalls mecanism. Well, at
least we are now on a good path to a solution :)

There's one thing Egbert pointed me to: Some arch may require also to be
passed a "shift" information indicating a necessary shift on the CPU
addresses when mapping the PCI addresses. If I understand Egbert
correctly, than mean than an inb-like function would do something like
*((u8*)(addr << shift)), addr beeing the register address in the card's
space. This needs to be returned by this driver (via another ioctl).
Also, this driver could probably also handle read/writes so that simple
things that don't need specific performances can simply use those
functions and avoid having to handle the shift at all.

We also need to somewhat handle the legacy ISA space. I beleive we can
decide once for all that we handle only one legacy ISA space and decide
at boot time on which bus/bridge/offset it is located.

Finally, we need an interface to PCI config accesses. My understanding is
that XFree remapping cards by doing direct config accesses will harm hot-
swap PCI and Cardbus dynamic assignement in the kernel. This interface
would allow the kernel to notice what's going on.

I've just finished implementing alpha-like syscalls on my 2.2 PPC tree,
it's mostly a "proof of concept" for now, but your idea is probably better.

Note: I suggest this discussion be moved out of XFree-devel to linux-
lernel for now, I'll stop bcc'ing it.

Ben.

-
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:22 EST