Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 20064
b: refs/heads/master
c: a958a26
h: refs/heads/master
v: v3
  • Loading branch information
Jake Moilanen authored and Paul Mackerras committed Feb 7, 2006
1 parent 7a88737 commit 8eb2fde
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: cdc3ee8f2061bafe7593bab0096a0e711408b0f9
refs/heads/master: a958a2648602aaa8f98aeb3c1c914f1b8096bfdc
9 changes: 6 additions & 3 deletions trunk/arch/powerpc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,6 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,

spin_unlock_irqrestore(&(tbl->it_lock), flags);

/* Make sure updates are seen by hardware */
mb();

DBG("mapped %d elements:\n", outcount);

/* For the sake of iommu_unmap_sg, we clear out the length in the
Expand All @@ -347,6 +344,10 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
outs->dma_address = DMA_ERROR_CODE;
outs->dma_length = 0;
}

/* Make sure updates are seen by hardware */
mb();

return outcount;

failure:
Expand All @@ -358,6 +359,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
npages = (PAGE_ALIGN(s->dma_address + s->dma_length) - vaddr)
>> PAGE_SHIFT;
__iommu_free(tbl, vaddr, npages);
s->dma_address = DMA_ERROR_CODE;
s->dma_length = 0;
}
}
spin_unlock_irqrestore(&(tbl->it_lock), flags);
Expand Down

0 comments on commit 8eb2fde

Please sign in to comment.