RFC s390/pci: expose a PCI device's UID as its index
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest1 patch 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | s390/pci: expose a PCI device's UID as its indexDocumentation/ arch/ | +43 | 3 replies |
Reviews trailers per patch
The patch has a Reviewed-by or Acked-by.
| Patch | Viktor Mihajlovski |
|---|---|
| 1/1 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC 0/1] s390/pci: expose a PCI device's UID as its index
Hi,
On s390 each PCI device has a user-defined ID (UID). This ID was designed to serve as the PCI device's primary index and to match the device within Linux to the with the view in the hypervisor configuration. To serve as a primary identifier the UID must be unique within the Linux instance, this is guaranteed by the platform if and only if the UID Uniqueness Checking flag is set within the CLP List PCI Functions response which is also currently used to determine whether the UID is also used as the Domain part of the geographical PCI address of the device.
As primary identifier of a PCI device, the UID serves an analogous function as the SMBIOS instance number or ACPI index exposed as the "index" respectively "acpi_index" device attributes. These attributes are used by e.g. systemd/udev to set network interface names. As s390 does not use ACPI nor SMBIOS there is no conflict and we can expose the UID under the "index" attribute whenever UID Uniqueness Checking is active and systemd/udev will then create "eno<UID>.." interface names.
Note: This is an evolution of an earlier patch I sent for exposing the UID Uniqueness Checking flag directly. Thank you Greg for making me realize that we were looking too much at just exposing platform details instead of looking how existing interfaces could suit our purpose.
Thanks,
Niklas Schnelle
Niklas Schnelle (1):
s390/pci: expose a PCI device's UID as its index
Documentation/ABI/testing/sysfs-bus-pci | 11 +++++--- arch/s390/pci/pci_sysfs.c | 36 +++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 4 deletions(-)
Signature · 1 line
2.25.1