iommu/vt-d: Remove the useless dma_pte_addr
authorYijing Wang <wangyijing@huawei.com>
Mon, 26 May 2014 12:13:47 +0000 (20:13 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 4 Jul 2014 09:34:20 +0000 (11:34 +0200)
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c

index 5d86e932c8dc2ef1d66da6bb06a6137097a6b540..cc2d22243fc085f4dbc4b848bf8ed3faf21bb630 100644 (file)
@@ -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;