Joerg Roedel | 5cdede2 | 2011-04-04 15:55:18 +0200 | [diff] [blame] | 1 | #ifndef LINUX_PCI_ATS_H |
| 2 | #define LINUX_PCI_ATS_H |
| 3 | |
Joerg Roedel | db3c33c | 2011-09-27 15:57:13 +0200 | [diff] [blame] | 4 | #include <linux/pci.h> |
| 5 | |
Joerg Roedel | c320b97 | 2011-09-27 15:57:15 +0200 | [diff] [blame] | 6 | #ifdef CONFIG_PCI_PRI |
| 7 | |
Bjorn Helgaas | f39d5b7 | 2013-04-12 12:02:59 -0600 | [diff] [blame] | 8 | int pci_enable_pri(struct pci_dev *pdev, u32 reqs); |
| 9 | void pci_disable_pri(struct pci_dev *pdev); |
Bjorn Helgaas | f39d5b7 | 2013-04-12 12:02:59 -0600 | [diff] [blame] | 10 | int pci_reset_pri(struct pci_dev *pdev); |
Joerg Roedel | c320b97 | 2011-09-27 15:57:15 +0200 | [diff] [blame] | 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 | |
Joerg Roedel | c320b97 | 2011-09-27 15:57:15 +0200 | [diff] [blame] | 23 | static inline int pci_reset_pri(struct pci_dev *pdev) |
| 24 | { |
| 25 | return -ENODEV; |
| 26 | } |
| 27 | |
Joerg Roedel | c320b97 | 2011-09-27 15:57:15 +0200 | [diff] [blame] | 28 | #endif /* CONFIG_PCI_PRI */ |
| 29 | |
Joerg Roedel | 086ac11 | 2011-09-27 15:57:16 +0200 | [diff] [blame] | 30 | #ifdef CONFIG_PCI_PASID |
| 31 | |
Bjorn Helgaas | f39d5b7 | 2013-04-12 12:02:59 -0600 | [diff] [blame] | 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); |
Joerg Roedel | 086ac11 | 2011-09-27 15:57:16 +0200 | [diff] [blame] | 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 | |
Joerg Roedel | 5cdede2 | 2011-04-04 15:55:18 +0200 | [diff] [blame] | 61 | #endif /* LINUX_PCI_ATS_H*/ |