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
8int pci_enable_pri(struct pci_dev *pdev, u32 reqs);
9void pci_disable_pri(struct pci_dev *pdev);
10int pci_reset_pri(struct pci_dev *pdev);
11
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
23static 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
32int 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);
36
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
61#endif /* LINUX_PCI_ATS_H*/
62