linux/arch/s390
Niklas Schnelle 81bbf03905 s390/pci: expose a PCI device's UID as its index
On s390 each PCI device has a user-defined ID (UID) exposed under
/sys/bus/pci/devices/<dev>/uid. This ID was designed to serve as the PCI
device's primary index and to match the device within Linux to the
device configured in the hypervisor. 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.

In this sense the UID serves an analogous function as the SMBIOS
instance number or ACPI index exposed as the "index" respectively
"acpi_index" device attributes and used by e.g. systemd to set interface
names. As s390 does not use and will likely never use ACPI nor SMBIOS
there is no conflict and we can just expose the UID under the "index"
attribute whenever UID Uniqueness Checking is active and get systemd's
interface naming support for free.

Link: https://lore.kernel.org/lkml/20210412135905.1434249-1-schnelle@linux.ibm.com/
Acked-by: Viktor Mihajlovski <mihajlov@linux.ibm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Narendra K <narendra_k@dell.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2021-04-20 14:48:27 +02:00
..
appldata
boot s390: uv: Fix sysfs max number of VCPUs reporting 2021-01-27 13:00:04 +01:00
configs s390: update defconfigs 2021-04-12 12:46:43 +02:00
crypto s390/crc32-vx: couple of typo fixes 2021-03-24 16:06:19 +01:00
hypfs s390/hypfs: use store_tod_clock_ext() 2021-02-13 17:17:55 +01:00
include s390/atomic,cmpxchg: always inline __xchg/__cmpxchg 2021-04-18 21:32:02 +02:00
kernel s390/smp: fix do_restart() prototype 2021-04-18 21:32:02 +02:00
kvm s390/time,idle: get rid of unsigned long long 2021-03-08 10:46:27 +01:00
lib s390/test_unwind: print test suite start/end info 2021-04-15 17:47:42 +02:00
mm s390/traps,mm: add conditional trap handlers 2021-04-12 12:46:42 +02:00
net bpf: Rename BPF_XADD and prepare to encode other atomics in .imm 2021-01-14 18:34:29 -08:00
pci s390/pci: expose a PCI device's UID as its index 2021-04-20 14:48:27 +02:00
purgatory - Add support for the hugetlb_cma command line option to allocate gigantic 2020-12-14 16:22:26 -08:00
tools s390/opcodes: rename selhhhr to selfhr 2021-02-24 00:31:22 +01:00
Kbuild s390/numa: move code to arch/s390/kernel 2020-08-11 18:16:55 +02:00
Kconfig Rework of the X86 irq stack handling: 2021-02-24 16:32:23 -08:00
Kconfig.debug s390/cio: add CRW inject functionality 2021-03-22 11:36:04 +01:00
Makefile arch: s390: Remove CONFIG_OPROFILE support 2021-01-29 10:05:51 +05:30