diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/amd-iommu.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/amd-iommu.h b/include/linux/amd-iommu.h index c03c281ae6ee..ef00610837d4 100644 --- a/include/linux/amd-iommu.h +++ b/include/linux/amd-iommu.h | |||
| @@ -145,6 +145,23 @@ struct amd_iommu_device_info { | |||
| 145 | extern int amd_iommu_device_info(struct pci_dev *pdev, | 145 | extern int amd_iommu_device_info(struct pci_dev *pdev, |
| 146 | struct amd_iommu_device_info *info); | 146 | struct amd_iommu_device_info *info); |
| 147 | 147 | ||
| 148 | /** | ||
| 149 | * amd_iommu_set_invalidate_ctx_cb() - Register a call-back for invalidating | ||
| 150 | * a pasid context. This call-back is | ||
| 151 | * invoked when the IOMMUv2 driver needs to | ||
| 152 | * invalidate a PASID context, for example | ||
| 153 | * because the task that is bound to that | ||
| 154 | * context is about to exit. | ||
| 155 | * | ||
| 156 | * @pdev: The PCI device the call-back should be registered for | ||
| 157 | * @cb: The call-back function | ||
| 158 | */ | ||
| 159 | |||
| 160 | typedef void (*amd_iommu_invalidate_ctx)(struct pci_dev *pdev, int pasid); | ||
| 161 | |||
| 162 | extern int amd_iommu_set_invalidate_ctx_cb(struct pci_dev *pdev, | ||
| 163 | amd_iommu_invalidate_ctx cb); | ||
| 164 | |||
| 148 | #else | 165 | #else |
| 149 | 166 | ||
| 150 | static inline int amd_iommu_detect(void) { return -ENODEV; } | 167 | static inline int amd_iommu_detect(void) { return -ENODEV; } |
