diff options
| -rw-r--r-- | drivers/iommu/intel-iommu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 5d86e932c8dc..cc2d22243fc0 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c | |||
| @@ -849,13 +849,11 @@ static struct dma_pte *pfn_to_dma_pte(struct dmar_domain *domain, | |||
| 849 | 849 | ||
| 850 | domain_flush_cache(domain, tmp_page, VTD_PAGE_SIZE); | 850 | domain_flush_cache(domain, tmp_page, VTD_PAGE_SIZE); |
| 851 | pteval = ((uint64_t)virt_to_dma_pfn(tmp_page) << VTD_PAGE_SHIFT) | DMA_PTE_READ | DMA_PTE_WRITE; | 851 | pteval = ((uint64_t)virt_to_dma_pfn(tmp_page) << VTD_PAGE_SHIFT) | DMA_PTE_READ | DMA_PTE_WRITE; |
| 852 | if (cmpxchg64(&pte->val, 0ULL, pteval)) { | 852 | if (cmpxchg64(&pte->val, 0ULL, pteval)) |
| 853 | /* Someone else set it while we were thinking; use theirs. */ | 853 | /* Someone else set it while we were thinking; use theirs. */ |
| 854 | free_pgtable_page(tmp_page); | 854 | free_pgtable_page(tmp_page); |
| 855 | } else { | 855 | else |
| 856 | dma_pte_addr(pte); | ||
| 857 | domain_flush_cache(domain, pte, sizeof(*pte)); | 856 | domain_flush_cache(domain, pte, sizeof(*pte)); |
| 858 | } | ||
| 859 | } | 857 | } |
| 860 | if (level == 1) | 858 | if (level == 1) |
| 861 | break; | 859 | break; |
