Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112596
b: refs/heads/master
c: 5507eef
h: refs/heads/master
v: v3
  • Loading branch information
Joerg Roedel authored and Ingo Molnar committed Sep 19, 2008
1 parent 39ba809 commit 0cc01fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1c65577398589bb44ab0980f9b9d30804b48a5db
refs/heads/master: 5507eef835c9c941e69d6d96e4b43af23eeb4ac9
12 changes: 6 additions & 6 deletions trunk/arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ static dma_addr_t map_single(struct device *dev, phys_addr_t paddr,
if (addr == bad_dma_address)
goto out;

if (iommu->need_sync)
if (unlikely(iommu->need_sync))
iommu_completion_wait(iommu);

out:
Expand Down Expand Up @@ -905,7 +905,7 @@ static void unmap_single(struct device *dev, dma_addr_t dma_addr,

__unmap_single(iommu, domain->priv, dma_addr, size, dir);

if (iommu->need_sync)
if (unlikely(iommu->need_sync))
iommu_completion_wait(iommu);

spin_unlock_irqrestore(&domain->lock, flags);
Expand Down Expand Up @@ -968,7 +968,7 @@ static int map_sg(struct device *dev, struct scatterlist *sglist,
goto unmap;
}

if (iommu->need_sync)
if (unlikely(iommu->need_sync))
iommu_completion_wait(iommu);

out:
Expand Down Expand Up @@ -1014,7 +1014,7 @@ static void unmap_sg(struct device *dev, struct scatterlist *sglist,
s->dma_address = s->dma_length = 0;
}

if (iommu->need_sync)
if (unlikely(iommu->need_sync))
iommu_completion_wait(iommu);

spin_unlock_irqrestore(&domain->lock, flags);
Expand Down Expand Up @@ -1061,7 +1061,7 @@ static void *alloc_coherent(struct device *dev, size_t size,
goto out;
}

if (iommu->need_sync)
if (unlikely(iommu->need_sync))
iommu_completion_wait(iommu);

out:
Expand Down Expand Up @@ -1093,7 +1093,7 @@ static void free_coherent(struct device *dev, size_t size,

__unmap_single(iommu, domain->priv, dma_addr, size, DMA_BIDIRECTIONAL);

if (iommu->need_sync)
if (unlikely(iommu->need_sync))
iommu_completion_wait(iommu);

spin_unlock_irqrestore(&domain->lock, flags);
Expand Down

0 comments on commit 0cc01fa

Please sign in to comment.