aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/pci.h
diff options
context:
space:
mode:
authorNiklas Schnelle <schnelle@linux.ibm.com>2021-02-12 14:19:31 +0100
committerHeiko Carstens <hca@linux.ibm.com>2021-04-12 12:46:42 +0200
commita50297cf8235b062bcdeaa8b1dad58e69d3e1b43 (patch)
tree12be5624238a016ed1c88f1ad6b3a571a7694f5d /arch/s390/include/asm/pci.h
parents390/pci: do more bus setup in zpci_bus_scan() (diff)
downloadlinux-dev-a50297cf8235b062bcdeaa8b1dad58e69d3e1b43.tar.xz
linux-dev-a50297cf8235b062bcdeaa8b1dad58e69d3e1b43.zip
s390/pci: separate zbus creation from scanning
In the existing code the creation of the PCI bus and the scanning of function zero all happens in zpci_scan_bus(). This in turn requires functions to be enabled and their resources to be available before the PCI bus is even created. This not only means that functions are enabled long before they are actually made available to the common PCI subsystem. In case of functions with non-zero devfn which appeared before the function with devfn zero they can wait arbitrarily long in this enabled but not scanned state. Fix this by separating the creation of the PCI bus from scanning it and only prepare, that is enable and setup MMIO bus resources, functions just before they are scanned. As they may be scanned multiple times track if we already created resources in the zdev. Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com> Acked-by: Pierre Morel <pmorel@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/pci.h')
-rw-r--r--arch/s390/include/asm/pci.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h
index 35dec33c2801..d810ea4d358f 100644
--- a/arch/s390/include/asm/pci.h
+++ b/arch/s390/include/asm/pci.h
@@ -130,9 +130,10 @@ struct zpci_dev {
u8 port;
u8 rid_available : 1;
u8 has_hp_slot : 1;
+ u8 has_resources : 1;
u8 is_physfn : 1;
u8 util_str_avail : 1;
- u8 reserved : 4;
+ u8 reserved : 3;
unsigned int devfn; /* DEVFN part of the RID*/
struct mutex lock;