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