[parisc-linux] RFC: I/O tree design

Matthew Wilcox matthew@wil.cx
Tue, 6 Feb 2001 06:02:57 +0000


On Mon, Feb 05, 2001 at 10:34:48AM -0800, Grant Grundler wrote:
> Matthew Wilcox wrote:
> ...
> > One advantage of doing this is that `Child' could be a pointer to a
> > PCI bus.
> 
> I don't think I want that. PCI busses have their own heirarchy
> and I would much rather keep them quite seperate. At least for
> the moment I would. Future abstraction of native bus access
> and mgt methods might make this more interesting.

I was thinking along the lines of:

struct hp_bus;
struct hp_device {
	[...]
	int bus_type;
	union {
		struct pci_bus *pci;
		struct hp_bus *hp;
	} child;
};

and then use the pci_bus sysdata to point to the struct hp_device which
is the parent of this pci_bus.

Rather than try to abuse the `parent' entry in the pci_bus.

> Sometimes, it's convenient to think of the memory controller(s)
> as the "parent" of the central bus and memory banks as children
> (just like CPU would also be a child). This model works under ccNuma
> as well with memory at multiple levels in the I/O tree.

Yeah, I was thinking about that.  In some of the larger systems (say,
N class), there's no real central point at which to base the bus walk,
other than the Stretch memory controller.

-- 
Revolutions do not require corporate support.