Re: [BKPATCH] allow pci primary peer busses to have parents

Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Thu, 5 Dec 2002 20:19:07 +0300


On Thu, Dec 05, 2002 at 09:33:29AM -0600, James Bottomley wrote:
> ink@jurassic.park.msu.ru said:
> > isa/pnp stuff. This will be absolutely required if DMA operations are
> > moved from pci_dev to the generic device.
>
> Well, we are moving in this direction. I've already done the conversion for
> MCA. Marc Zyngier has done it for EISA. I believe someone is looking at PnP
> ISA. ISA, as a non-probe'able bus fits into the legacy bus scheme anyway.

Nice to know. :-)
Current approach with initcalls doesn't work - basically, only architecture
specific code knows what bus types are primary and therefore should be
initialized first. IOW, it would be good to have something like you've
suggested for PCI for any bus type:

XXX_bus_init(struct device *parent, int busnum)

> > The `sysdata' arg already contains info about parent host-to-pci
> > controller on many platforms. I don't think that we need to duplicate
> > it with another one. I was thinking about something like this instead
> > of `sysdata':
>
> That's PCI specific.

Actually it isn't. It just happens to be that sysdata == pci_controller
on pci-based machines. However, these structures have very little to
do with PCI - it's all about IOMMUs, various address ranges and other
host-specific data.

> We need a coherent tree in the generic model. To do
> this, the PCI parent information has to be available just using the struct
> device, without having to cast it to pci_dev and look at pci specific fields.

Of course.

> This is a simplification requirement for machines whose IOMMUs lie on other
> bus types above the PCI busses.

That's why I suggested `io_controller' name, but I can live with just
`sysdata' as well. :-)

> You have to be able to walk up the device
> tree until you find the IOMMU. Since you're sharing the implementation with
> the non-PCI busses, you need to be able to do this in a generic manner.

Right, but walking up the entire tree every time is rather painful.
Things like pci^H^H^Hdma_map_{single,sg} are supposed to be fast, so I'd
like to gather IOMMU and other info directly from struct device * passed
as argument to these functions.

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