Re: [BUG/MEMLEAK?] struct pci_bus, child busses & bridges

From: Patrick Mochel
Date: Thu Sep 25 2003 - 14:00:04 EST



> Ok, I see that now. I guess my only remaining question is why do child
> busses not get their own struct device, but rather only a pointer to the
> bridge's struct device? There's no refcounting done on this, ie: no
> pci_dev_get/put calls, but I guess that's kinda ok, since we're pretty
> sure that the child bus won't exist for longer than the bridge that owns
> it, right? So using the bridge's struct dev allows the pci topology to
> look cleaner? As in, there's no actual bus exposed in sysfs/procfs/etc,
> just devices that seem to be hanging off the bridge?

Buses are not devices. Bridges are devices and get a struct device. Buses
are physical (or logical) collections of devices at the same topological
level which reside on one side of a bridge. I.e. they are objects of some
sort, but not devices, and hence are not represented in /sys/devices/.

It would be nice to export them in /sys/bus/pci/ somehow, but it's one of
those things that I haven't gotten around to in the last 6 months or so.
:)


Pat


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/