blob: 782fb8e0755f1682ee29445fee2626150cb69387 [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);
CQ Tang4ebeb1e2017-05-30 09:25:49 -070010void pci_restore_pri_state(struct pci_dev *pdev);
Bjorn Helgaasf39d5b72013-04-12 12:02:59 -060011int pci_reset_pri(struct pci_dev *pdev);
Joerg Roedelc320b972011-09-27 15:57:15 +020012
13#else /* CONFIG_PCI_PRI */
14
15static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs)
16{
17 return -ENODEV;
18}
19
20static inline void pci_disable_pri(struct pci_dev *pdev)
21{
22}
23
CQ Tang4ebeb1e2017-05-30 09:25:49 -070024static inline void pci_restore_pri_state(struct pci_dev *pdev)
25{
26}
27
Joerg Roedelc320b972011-09-27 15:57:15 +020028static inline int pci_reset_pri(struct pci_dev *pdev)
29{
30 return -ENODEV;
31}
32
Joerg Roedelc320b972011-09-27 15:57:15 +020033#endif /* CONFIG_PCI_PRI */
34
Joerg Roedel086ac112011-09-27 15:57:16 +020035#ifdef CONFIG_PCI_PASID
36
Bjorn Helgaasf39d5b72013-04-12 12:02:59 -060037int pci_enable_pasid(struct pci_dev *pdev, int features);
38void pci_disable_pasid(struct pci_dev *pdev);
CQ Tang4ebeb1e2017-05-30 09:25:49 -070039void pci_restore_pasid_state(struct pci_dev *pdev);
Bjorn Helgaasf39d5b72013-04-12 12:02:59 -060040int pci_pasid_features(struct pci_dev *pdev);
41int pci_max_pasids(struct pci_dev *pdev);
Joerg Roedel086ac112011-09-27 15:57:16 +020042
43#else /* CONFIG_PCI_PASID */
44
45static inline int pci_enable_pasid(struct pci_dev *pdev, int features)
46{
47 return -EINVAL;
48}
49
50static inline void pci_disable_pasid(struct pci_dev *pdev)
51{
52}
53
CQ Tang4ebeb1e2017-05-30 09:25:49 -070054static inline void pci_restore_pasid_state(struct pci_dev *pdev)
55{
56}
57
Joerg Roedel086ac112011-09-27 15:57:16 +020058static inline int pci_pasid_features(struct pci_dev *pdev)
59{
60 return -EINVAL;
61}
62
63static inline int pci_max_pasids(struct pci_dev *pdev)
64{
65 return -EINVAL;
66}
67
68#endif /* CONFIG_PCI_PASID */
69
70
Joerg Roedel5cdede22011-04-04 15:55:18 +020071#endif /* LINUX_PCI_ATS_H*/