xref: /openbmc/linux/arch/s390/pci/pci_iov.h (revision cbecf716ca618fd44feda6bd9a64a8179d031fc5)
1*abb95b75SNiklas Schnelle /* SPDX-License-Identifier: GPL-2.0 */
2*abb95b75SNiklas Schnelle /*
3*abb95b75SNiklas Schnelle  * Copyright IBM Corp. 2020
4*abb95b75SNiklas Schnelle  *
5*abb95b75SNiklas Schnelle  * Author(s):
6*abb95b75SNiklas Schnelle  *   Niklas Schnelle <schnelle@linux.ibm.com>
7*abb95b75SNiklas Schnelle  *
8*abb95b75SNiklas Schnelle  */
9*abb95b75SNiklas Schnelle 
10*abb95b75SNiklas Schnelle #ifndef __S390_PCI_IOV_H
11*abb95b75SNiklas Schnelle #define __S390_PCI_IOV_H
12*abb95b75SNiklas Schnelle 
13*abb95b75SNiklas Schnelle #ifdef CONFIG_PCI_IOV
14*abb95b75SNiklas Schnelle void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn);
15*abb95b75SNiklas Schnelle 
16*abb95b75SNiklas Schnelle void zpci_iov_map_resources(struct pci_dev *pdev);
17*abb95b75SNiklas Schnelle 
18*abb95b75SNiklas Schnelle int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn);
19*abb95b75SNiklas Schnelle 
20*abb95b75SNiklas Schnelle #else /* CONFIG_PCI_IOV */
zpci_iov_remove_virtfn(struct pci_dev * pdev,int vfn)21*abb95b75SNiklas Schnelle static inline void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn) {}
22*abb95b75SNiklas Schnelle 
zpci_iov_map_resources(struct pci_dev * pdev)23*abb95b75SNiklas Schnelle static inline void zpci_iov_map_resources(struct pci_dev *pdev) {}
24*abb95b75SNiklas Schnelle 
zpci_iov_setup_virtfn(struct zpci_bus * zbus,struct pci_dev * virtfn,int vfn)25*abb95b75SNiklas Schnelle static inline int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
26*abb95b75SNiklas Schnelle {
27*abb95b75SNiklas Schnelle 	return 0;
28*abb95b75SNiklas Schnelle }
29*abb95b75SNiklas Schnelle #endif /* CONFIG_PCI_IOV */
30*abb95b75SNiklas Schnelle #endif /* __S390_PCI_IOV_h */
31