]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
5cdede24 JR |
2 | #ifndef LINUX_PCI_ATS_H |
3 | #define LINUX_PCI_ATS_H | |
4 | ||
db3c33c6 JR |
5 | #include <linux/pci.h> |
6 | ||
b24d5c20 KW |
7 | #ifdef CONFIG_PCI_ATS |
8 | /* Address Translation Service */ | |
9 | int pci_enable_ats(struct pci_dev *dev, int ps); | |
10 | void pci_disable_ats(struct pci_dev *dev); | |
11 | int pci_ats_queue_depth(struct pci_dev *dev); | |
12 | int pci_ats_page_aligned(struct pci_dev *dev); | |
13 | #else /* CONFIG_PCI_ATS */ | |
14 | static inline int pci_enable_ats(struct pci_dev *d, int ps) | |
15 | { return -ENODEV; } | |
16 | static inline void pci_disable_ats(struct pci_dev *d) { } | |
17 | static inline int pci_ats_queue_depth(struct pci_dev *d) | |
18 | { return -ENODEV; } | |
19 | static inline int pci_ats_page_aligned(struct pci_dev *dev) | |
20 | { return 0; } | |
21 | #endif /* CONFIG_PCI_ATS */ | |
c320b976 | 22 | |
b24d5c20 | 23 | #ifdef CONFIG_PCI_PRI |
f39d5b72 BH |
24 | int pci_enable_pri(struct pci_dev *pdev, u32 reqs); |
25 | void pci_disable_pri(struct pci_dev *pdev); | |
f39d5b72 | 26 | int pci_reset_pri(struct pci_dev *pdev); |
8cbb8a93 | 27 | int pci_prg_resp_pasid_required(struct pci_dev *pdev); |
c320b976 JR |
28 | #endif /* CONFIG_PCI_PRI */ |
29 | ||
086ac11f | 30 | #ifdef CONFIG_PCI_PASID |
f39d5b72 BH |
31 | int pci_enable_pasid(struct pci_dev *pdev, int features); |
32 | void pci_disable_pasid(struct pci_dev *pdev); | |
33 | int pci_pasid_features(struct pci_dev *pdev); | |
34 | int pci_max_pasids(struct pci_dev *pdev); | |
b24d5c20 | 35 | #else /* CONFIG_PCI_PASID */ |
5a4549fd JPB |
36 | static inline int pci_enable_pasid(struct pci_dev *pdev, int features) |
37 | { return -EINVAL; } | |
38 | static inline void pci_disable_pasid(struct pci_dev *pdev) { } | |
086ac11f | 39 | static inline int pci_pasid_features(struct pci_dev *pdev) |
b24d5c20 | 40 | { return -EINVAL; } |
086ac11f | 41 | static inline int pci_max_pasids(struct pci_dev *pdev) |
b24d5c20 | 42 | { return -EINVAL; } |
086ac11f JR |
43 | #endif /* CONFIG_PCI_PASID */ |
44 | ||
b24d5c20 | 45 | #endif /* LINUX_PCI_ATS_H */ |