blob: 57e0b8250947b099110e999246cba662684b3149 [file] [log] [blame]
Joerg Roedel5cdede22011-04-04 15:55:18 +02001#ifndef LINUX_PCI_ATS_H
2#define LINUX_PCI_ATS_H
3
Joerg Roedeldb3c33c2011-09-27 15:57:13 +02004#include <linux/pci.h>
5
Joerg Roedelc320b972011-09-27 15:57:15 +02006#ifdef CONFIG_PCI_PRI
7
Bjorn Helgaasf39d5b72013-04-12 12:02:59 -06008int pci_enable_pri(struct pci_dev *pdev, u32 reqs);
9void pci_disable_pri(struct pci_dev *pdev);
Bjorn Helgaasf39d5b72013-04-12 12:02:59 -060010int pci_reset_pri(struct pci_dev *pdev);
Joerg Roedelc320b972011-09-27 15:57:15 +020011
12#else /* CONFIG_PCI_PRI */
13
14static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs)
15{
16 return -ENODEV;
17}
18
19static inline void pci_disable_pri(struct pci_dev *pdev)
20{
21}
22
Joerg Roedelc320b972011-09-27 15:57:15 +020023static inline int pci_reset_pri(struct pci_dev *pdev)
24{
25 return -ENODEV;
26}
27
Joerg Roedelc320b972011-09-27 15:57:15 +020028#endif /* CONFIG_PCI_PRI */
29
Joerg Roedel086ac112011-09-27 15:57:16 +020030#ifdef CONFIG_PCI_PASID
31
Bjorn Helgaasf39d5b72013-04-12 12:02:59 -060032int pci_enable_pasid(struct pci_dev *pdev, int features);
33void pci_disable_pasid(struct pci_dev *pdev);
34int pci_pasid_features(struct pci_dev *pdev);
35int pci_max_pasids(struct pci_dev *pdev);
Joerg Roedel086ac112011-09-27 15:57:16 +020036
37#else /* CONFIG_PCI_PASID */
38
39static inline int pci_enable_pasid(struct pci_dev *pdev, int features)
40{
41 return -EINVAL;
42}
43
44static inline void pci_disable_pasid(struct pci_dev *pdev)
45{
46}
47
48static inline int pci_pasid_features(struct pci_dev *pdev)
49{
50 return -EINVAL;
51}
52
53static inline int pci_max_pasids(struct pci_dev *pdev)
54{
55 return -EINVAL;
56}
57
58#endif /* CONFIG_PCI_PASID */
59
60
Joerg Roedel5cdede22011-04-04 15:55:18 +020061#endif /* LINUX_PCI_ATS_H*/