1 #ifndef LINUX_PCI_ATS_H 2 #define LINUX_PCI_ATS_H 3 4 #include <linux/pci.h> 5 6 #ifdef CONFIG_PCI_PRI 7 8 int pci_enable_pri(struct pci_dev *pdev, u32 reqs); 9 void pci_disable_pri(struct pci_dev *pdev); 10 int pci_reset_pri(struct pci_dev *pdev); 11 12 #else /* CONFIG_PCI_PRI */ 13 14 static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs) 15 { 16 return -ENODEV; 17 } 18 19 static inline void pci_disable_pri(struct pci_dev *pdev) 20 { 21 } 22 23 static inline int pci_reset_pri(struct pci_dev *pdev) 24 { 25 return -ENODEV; 26 } 27 28 #endif /* CONFIG_PCI_PRI */ 29 30 #ifdef CONFIG_PCI_PASID 31 32 int pci_enable_pasid(struct pci_dev *pdev, int features); 33 void pci_disable_pasid(struct pci_dev *pdev); 34 int pci_pasid_features(struct pci_dev *pdev); 35 int pci_max_pasids(struct pci_dev *pdev); 36 37 #else /* CONFIG_PCI_PASID */ 38 39 static inline int pci_enable_pasid(struct pci_dev *pdev, int features) 40 { 41 return -EINVAL; 42 } 43 44 static inline void pci_disable_pasid(struct pci_dev *pdev) 45 { 46 } 47 48 static inline int pci_pasid_features(struct pci_dev *pdev) 49 { 50 return -EINVAL; 51 } 52 53 static inline int pci_max_pasids(struct pci_dev *pdev) 54 { 55 return -EINVAL; 56 } 57 58 #endif /* CONFIG_PCI_PASID */ 59 60 61 #endif /* LINUX_PCI_ATS_H*/ 62