On Wed, Nov 20, 2024 at 10:10:21AM +0100, Mariusz Tkaczyk wrote: > On Fri, 15 Nov 2024 11:48:55 -0600 > Bjorn Helgaas <helgaas@xxxxxxxxxx> wrote: > > > The "BUS0" nomenclature seems heavily embedded in the vmd driver but > > is really a misnomer. Maybe that reflects similar terminology in an > > internal spec? Any hard-wiring of bus numbers reflects a property of > > the way a *Root Port* works, so using the right name will make this > > easier to understand, especially since there are other Root Ports with > > the same hard wiring. > > It is named as BUS_0 and BUS_1 because it refers to kernel's > pci_create_root_bus()`, we simplified it for better code wrapping. > > Looks like it confuses you, do you like ROOT_BUS0 and ROOT_BUS1 better? > > I don't see better fit than "root bus" because we are creating new root buses > accordingly. I was trying to use standard PCIe spec terminology where possible, but I misspoke above, sorry. I think we should pretend I never wrote that paragraph, and also ignore my suggestion about replacing "rootbus" with "Root Port" in the 7/8 commit log (sorry to everybody who never got the patches I was responding to). A "root bus" is the *primary* bus of a Root Port, so the root bus number is determined by the host bridge, which I guess would be considered part of a PCIe Root Complex. > Internally, it is called as "VMD domain" and each VMD Domain is presented as > separate pci root bus. > > The original naming is presented in the sysfs links: > - "domain" -> root bus 0 > = "domain1" -> root bus 1 > > i.e: > domain -> pci10000:e0/pci_bus/10000:e0 > domain1 -> pci10000:e1/pci_bus/10000:e1 That's fine, I'm not suggesting any sysfs change to this. Bjorn