diff options
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r-- | drivers/pci/intel-iommu.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c index 52026d1797ec..601c3278cf2a 100644 --- a/drivers/pci/intel-iommu.c +++ b/drivers/pci/intel-iommu.c | |||
@@ -2403,11 +2403,12 @@ int __init init_dmars(void) | |||
2403 | 2403 | ||
2404 | iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL); | 2404 | iommu->flush.flush_context(iommu, 0, 0, 0, DMA_CCMD_GLOBAL_INVL); |
2405 | iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH); | 2405 | iommu->flush.flush_iotlb(iommu, 0, 0, 0, DMA_TLB_GLOBAL_FLUSH); |
2406 | iommu_disable_protect_mem_regions(iommu); | ||
2407 | 2406 | ||
2408 | ret = iommu_enable_translation(iommu); | 2407 | ret = iommu_enable_translation(iommu); |
2409 | if (ret) | 2408 | if (ret) |
2410 | goto error; | 2409 | goto error; |
2410 | |||
2411 | iommu_disable_protect_mem_regions(iommu); | ||
2411 | } | 2412 | } |
2412 | 2413 | ||
2413 | return 0; | 2414 | return 0; |
@@ -3066,8 +3067,8 @@ static int init_iommu_hw(void) | |||
3066 | DMA_CCMD_GLOBAL_INVL); | 3067 | DMA_CCMD_GLOBAL_INVL); |
3067 | iommu->flush.flush_iotlb(iommu, 0, 0, 0, | 3068 | iommu->flush.flush_iotlb(iommu, 0, 0, 0, |
3068 | DMA_TLB_GLOBAL_FLUSH); | 3069 | DMA_TLB_GLOBAL_FLUSH); |
3069 | iommu_disable_protect_mem_regions(iommu); | ||
3070 | iommu_enable_translation(iommu); | 3070 | iommu_enable_translation(iommu); |
3071 | iommu_disable_protect_mem_regions(iommu); | ||
3071 | } | 3072 | } |
3072 | 3073 | ||
3073 | return 0; | 3074 | return 0; |