diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2008-12-03 09:14:02 -0500 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-01-03 08:11:08 -0500 |
commit | a8bcbb0de4a52f07fef7412ddc877348311ebf2a (patch) | |
tree | 450beb05789932f092faa18fa5dfda67e2a2476a /drivers | |
parent | d14d65777c2491dd5baf1e17f444b8f653f3cbb1 (diff) |
VT-d: register functions for the IOMMU API
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/intel-iommu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 712810598a2e..81e04ec85d97 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -277,6 +277,8 @@ static int intel_iommu_strict; | |||
277 | static DEFINE_SPINLOCK(device_domain_lock); | 277 | static DEFINE_SPINLOCK(device_domain_lock); |
278 | static LIST_HEAD(device_domain_list); | 278 | static LIST_HEAD(device_domain_list); |
279 | 279 | ||
280 | static struct iommu_ops intel_iommu_ops; | ||
281 | |||
280 | static int __init intel_iommu_setup(char *str) | 282 | static int __init intel_iommu_setup(char *str) |
281 | { | 283 | { |
282 | if (!str) | 284 | if (!str) |
@@ -2729,6 +2731,9 @@ int __init intel_iommu_init(void) | |||
2729 | init_timer(&unmap_timer); | 2731 | init_timer(&unmap_timer); |
2730 | force_iommu = 1; | 2732 | force_iommu = 1; |
2731 | dma_ops = &intel_dma_ops; | 2733 | dma_ops = &intel_dma_ops; |
2734 | |||
2735 | register_iommu(&intel_iommu_ops); | ||
2736 | |||
2732 | return 0; | 2737 | return 0; |
2733 | } | 2738 | } |
2734 | 2739 | ||
@@ -3119,3 +3124,13 @@ static phys_addr_t intel_iommu_iova_to_phys(struct iommu_domain *domain, | |||
3119 | 3124 | ||
3120 | return phys; | 3125 | return phys; |
3121 | } | 3126 | } |
3127 | |||
3128 | static struct iommu_ops intel_iommu_ops = { | ||
3129 | .domain_init = intel_iommu_domain_init, | ||
3130 | .domain_destroy = intel_iommu_domain_destroy, | ||
3131 | .attach_dev = intel_iommu_attach_device, | ||
3132 | .detach_dev = intel_iommu_detach_device, | ||
3133 | .map = intel_iommu_map_range, | ||
3134 | .unmap = intel_iommu_unmap_range, | ||
3135 | .iova_to_phys = intel_iommu_iova_to_phys, | ||
3136 | }; | ||