Re: pci_domain_nr vs. /sys/devices

Benjamin Herrenschmidt
2003-06-11T14:53:16Z

On Wed, 2003-06-11 at 16:48, Matthew Wilcox wrote:

> I don't think sysfs works like that (please correct me if I've
> misunderstood, mochel..)

Looks like nobody really understands it then ;)

> Look in /sys/bus/pci/devices/ There you have all the PCI devices
> lumped together in one place, and we obviously need the domain number
> in the name. I don't know where the 0 on the end of /sys/devices/pci0/
> comes from, but if we could, I wouldn't say no to:

Nah, you are mixing up /sys/bus/* which is a flat list of busses in the
machine, with /sys/devices/* which is the hierarchical device tree.

> I don't think the extra level of hierarchy in your suggestion is necessary
> or particularly desirable.

It's probably not, then it's a matter of properly renaming the pciN entries
in /sys/devices to be /sys/devices/pciDD:NN where DD is the domain number
and NN is the first bus on this domain, or just pciDD (though I like having
the bus number there as well)

Ben.