aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/pci.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.ibm.com>2019-06-27 15:13:05 +0200
committerVasily Gorbik <gor@linux.ibm.com>2019-07-04 13:13:57 +0200
commitc7ff0e918a7cb39f6bfb2a7bdc30199986ff1571 (patch)
tree072ed18459ad304b530f9a0af4442abd7e9943b1 /arch/s390/include/asm/pci.h
parents390: ap: kvm: Enable PQAP/AQIC facility for the guest (diff)
downloadlinux-dev-c7ff0e918a7cb39f6bfb2a7bdc30199986ff1571.tar.xz
linux-dev-c7ff0e918a7cb39f6bfb2a7bdc30199986ff1571.zip
s390/pci: deal with devices that have no support for MIO instructions
Unfortunately we have to handle a class of devices that don't support the new MIO instructions. Adjust resource assignment and mapping accordingly. Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/pci.h')
-rw-r--r--arch/s390/include/asm/pci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/include/asm/pci.h b/arch/s390/include/asm/pci.h
index 305befd55326..a2399eff84ca 100644
--- a/arch/s390/include/asm/pci.h
+++ b/arch/s390/include/asm/pci.h
@@ -194,6 +194,11 @@ int zpci_init_iommu(struct zpci_dev *zdev);
void zpci_destroy_iommu(struct zpci_dev *zdev);
#ifdef CONFIG_PCI
+static inline bool zpci_use_mio(struct zpci_dev *zdev)
+{
+ return static_branch_likely(&have_mio) && zdev->mio_capable;
+}
+
/* Error handling and recovery */
void zpci_event_error(void *);
void zpci_event_availability(void *);