linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/1] s390/pci: expose a PCI device's UID as its index
@ 2021-03-03  9:52 Niklas Schnelle
  2021-03-03  9:52 ` [RFC 1/1] " Niklas Schnelle
  0 siblings, 1 reply; 5+ messages in thread
From: Niklas Schnelle @ 2021-03-03  9:52 UTC (permalink / raw)
  To: Bjorn Helgaas, Narendra K, Greg Kroah-Hartman
  Cc: Viktor Mihajlovski, Stefan Raspl, Peter Oberparleiter, linux-pci,
	linux-kernel, linux-s390

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(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-08  8:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-03  9:52 [RFC 0/1] s390/pci: expose a PCI device's UID as its index Niklas Schnelle
2021-03-03  9:52 ` [RFC 1/1] " Niklas Schnelle
2021-03-07 20:46   ` Krzysztof Wilczyński
2021-03-08  7:02     ` Niklas Schnelle
2021-03-08  8:42       ` Viktor Mihajlovski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).