diff options
author | Yijing Wang <wangyijing@huawei.com> | 2014-05-26 20:13:47 +0800 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-04 11:34:20 +0200 |
commit | effad4b59f8a24f94c22c7fe38141c3b0576c366 (patch) | |
tree | ccb74645cf347d5be2ba75b5011ec01ad9b7ce1a /drivers/iommu/intel-iommu.c | |
parent | c3c75eb7fa516281ea923bced200bf2de55807cc (diff) | |
download | op-kernel-dev-effad4b59f8a24f94c22c7fe38141c3b0576c366.zip op-kernel-dev-effad4b59f8a24f94c22c7fe38141c3b0576c366.tar.gz |
iommu/vt-d: Remove the useless dma_pte_addr
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/intel-iommu.c')
-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 5d86e93..cc2d222 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, domain_flush_cache(domain, tmp_page, VTD_PAGE_SIZE); pteval = ((uint64_t)virt_to_dma_pfn(tmp_page) << VTD_PAGE_SHIFT) | DMA_PTE_READ | DMA_PTE_WRITE; - if (cmpxchg64(&pte->val, 0ULL, pteval)) { + if (cmpxchg64(&pte->val, 0ULL, pteval)) /* Someone else set it while we were thinking; use theirs. */ free_pgtable_page(tmp_page); - } else { - dma_pte_addr(pte); + else domain_flush_cache(domain, pte, sizeof(*pte)); - } } if (level == 1) break; |