summaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorPierre Morel <pmorel@linux.ibm.com>2020-02-21 17:20:46 +0100
committerVasily Gorbik <gor@linux.ibm.com>2020-04-28 13:49:46 +0200
commitd08d6f5d75242ceb410efbdf650efecc40d68c2d (patch)
tree7e99dbb1341c7bdbd60a3801c5bb0f0b70f498f2 /arch/s390
parente6ab7490ffaed83d6581f512e66c7c8cc6f58c2d (diff)
downloadlinux-d08d6f5d75242ceb410efbdf650efecc40d68c2d.tar.bz2
s390/pci: adaptation of iommu to multifunction
In the future the bus sysdata may not directly point to the zpci_dev. In preparation of upcoming patches let us abstract the access to the zpci_dev from the device inside the pci device. Signed-off-by: Pierre Morel <pmorel@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390')
-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 11560bfefe48..0e519197ea2d 100644
--- a/arch/s390/include/asm/pci.h
+++ b/arch/s390/include/asm/pci.h
@@ -231,6 +231,11 @@ static inline struct zpci_dev *to_zpci(struct pci_dev *pdev)
return pdev->sysdata;
}
+static inline struct zpci_dev *to_zpci_dev(struct device *dev)
+{
+ return to_zpci(to_pci_dev(dev));
+}
+
struct zpci_dev *get_zdev_by_fid(u32);
/* DMA */