.. | .. |
---|
4 | 4 | |
---|
5 | 5 | #include <linux/pci.h> |
---|
6 | 6 | |
---|
7 | | -#ifdef CONFIG_PCI_PRI |
---|
| 7 | +#ifdef CONFIG_PCI_ATS |
---|
| 8 | +/* Address Translation Service */ |
---|
| 9 | +bool pci_ats_supported(struct pci_dev *dev); |
---|
| 10 | +int pci_enable_ats(struct pci_dev *dev, int ps); |
---|
| 11 | +void pci_disable_ats(struct pci_dev *dev); |
---|
| 12 | +int pci_ats_queue_depth(struct pci_dev *dev); |
---|
| 13 | +int pci_ats_page_aligned(struct pci_dev *dev); |
---|
| 14 | +#else /* CONFIG_PCI_ATS */ |
---|
| 15 | +static inline bool pci_ats_supported(struct pci_dev *d) |
---|
| 16 | +{ return false; } |
---|
| 17 | +static inline int pci_enable_ats(struct pci_dev *d, int ps) |
---|
| 18 | +{ return -ENODEV; } |
---|
| 19 | +static inline void pci_disable_ats(struct pci_dev *d) { } |
---|
| 20 | +static inline int pci_ats_queue_depth(struct pci_dev *d) |
---|
| 21 | +{ return -ENODEV; } |
---|
| 22 | +static inline int pci_ats_page_aligned(struct pci_dev *dev) |
---|
| 23 | +{ return 0; } |
---|
| 24 | +#endif /* CONFIG_PCI_ATS */ |
---|
8 | 25 | |
---|
| 26 | +#ifdef CONFIG_PCI_PRI |
---|
9 | 27 | int pci_enable_pri(struct pci_dev *pdev, u32 reqs); |
---|
10 | 28 | void pci_disable_pri(struct pci_dev *pdev); |
---|
11 | | -void pci_restore_pri_state(struct pci_dev *pdev); |
---|
12 | 29 | int pci_reset_pri(struct pci_dev *pdev); |
---|
13 | | - |
---|
14 | | -#else /* CONFIG_PCI_PRI */ |
---|
15 | | - |
---|
16 | | -static inline int pci_enable_pri(struct pci_dev *pdev, u32 reqs) |
---|
17 | | -{ |
---|
18 | | - return -ENODEV; |
---|
19 | | -} |
---|
20 | | - |
---|
21 | | -static inline void pci_disable_pri(struct pci_dev *pdev) |
---|
22 | | -{ |
---|
23 | | -} |
---|
24 | | - |
---|
25 | | -static inline void pci_restore_pri_state(struct pci_dev *pdev) |
---|
26 | | -{ |
---|
27 | | -} |
---|
28 | | - |
---|
29 | | -static inline int pci_reset_pri(struct pci_dev *pdev) |
---|
30 | | -{ |
---|
31 | | - return -ENODEV; |
---|
32 | | -} |
---|
33 | | - |
---|
| 30 | +int pci_prg_resp_pasid_required(struct pci_dev *pdev); |
---|
| 31 | +bool pci_pri_supported(struct pci_dev *pdev); |
---|
| 32 | +#else |
---|
| 33 | +static inline bool pci_pri_supported(struct pci_dev *pdev) |
---|
| 34 | +{ return false; } |
---|
34 | 35 | #endif /* CONFIG_PCI_PRI */ |
---|
35 | 36 | |
---|
36 | 37 | #ifdef CONFIG_PCI_PASID |
---|
37 | | - |
---|
38 | 38 | int pci_enable_pasid(struct pci_dev *pdev, int features); |
---|
39 | 39 | void pci_disable_pasid(struct pci_dev *pdev); |
---|
40 | | -void pci_restore_pasid_state(struct pci_dev *pdev); |
---|
41 | 40 | int pci_pasid_features(struct pci_dev *pdev); |
---|
42 | 41 | int pci_max_pasids(struct pci_dev *pdev); |
---|
43 | | - |
---|
44 | | -#else /* CONFIG_PCI_PASID */ |
---|
45 | | - |
---|
| 42 | +#else /* CONFIG_PCI_PASID */ |
---|
46 | 43 | static inline int pci_enable_pasid(struct pci_dev *pdev, int features) |
---|
47 | | -{ |
---|
48 | | - return -EINVAL; |
---|
49 | | -} |
---|
50 | | - |
---|
51 | | -static inline void pci_disable_pasid(struct pci_dev *pdev) |
---|
52 | | -{ |
---|
53 | | -} |
---|
54 | | - |
---|
55 | | -static inline void pci_restore_pasid_state(struct pci_dev *pdev) |
---|
56 | | -{ |
---|
57 | | -} |
---|
58 | | - |
---|
| 44 | +{ return -EINVAL; } |
---|
| 45 | +static inline void pci_disable_pasid(struct pci_dev *pdev) { } |
---|
59 | 46 | static inline int pci_pasid_features(struct pci_dev *pdev) |
---|
60 | | -{ |
---|
61 | | - return -EINVAL; |
---|
62 | | -} |
---|
63 | | - |
---|
| 47 | +{ return -EINVAL; } |
---|
64 | 48 | static inline int pci_max_pasids(struct pci_dev *pdev) |
---|
65 | | -{ |
---|
66 | | - return -EINVAL; |
---|
67 | | -} |
---|
68 | | - |
---|
| 49 | +{ return -EINVAL; } |
---|
69 | 50 | #endif /* CONFIG_PCI_PASID */ |
---|
70 | 51 | |
---|
71 | | - |
---|
72 | | -#endif /* LINUX_PCI_ATS_H*/ |
---|
| 52 | +#endif /* LINUX_PCI_ATS_H */ |
---|