aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/amd_iommu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index a2e418cba0f..dfe7d37c82c 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -83,6 +83,8 @@ static struct iommu_ops amd_iommu_ops;
83static ATOMIC_NOTIFIER_HEAD(ppr_notifier); 83static ATOMIC_NOTIFIER_HEAD(ppr_notifier);
84int amd_iommu_max_glx_val = -1; 84int amd_iommu_max_glx_val = -1;
85 85
86static struct dma_map_ops amd_iommu_dma_ops;
87
86/* 88/*
87 * general struct to manage commands send to an IOMMU 89 * general struct to manage commands send to an IOMMU
88 */ 90 */
@@ -2267,6 +2269,13 @@ static int device_change_notifier(struct notifier_block *nb,
2267 list_add_tail(&dma_domain->list, &iommu_pd_list); 2269 list_add_tail(&dma_domain->list, &iommu_pd_list);
2268 spin_unlock_irqrestore(&iommu_pd_list_lock, flags); 2270 spin_unlock_irqrestore(&iommu_pd_list_lock, flags);
2269 2271
2272 dev_data = get_dev_data(dev);
2273
2274 if (!dev_data->passthrough)
2275 dev->archdata.dma_ops = &amd_iommu_dma_ops;
2276 else
2277 dev->archdata.dma_ops = &nommu_dma_ops;
2278
2270 break; 2279 break;
2271 case BUS_NOTIFY_DEL_DEVICE: 2280 case BUS_NOTIFY_DEL_DEVICE:
2272 2281