Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72297
b: refs/heads/master
c: 891039a
h: refs/heads/master
i:
  72295: 74d5ff1
v: v3
  • Loading branch information
Emil Medve authored and Jens Axboe committed Oct 23, 2007
1 parent 4863088 commit 0b5a1ca
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: 4e0177647a3686f3658c26d52a60d0f1231c2127
refs/heads/master: 891039a9c2ddf73754ad84cdc9d030f1c6431858
13 changes: 5 additions & 8 deletions trunk/include/asm-xtensa/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
BUG_ON(direction == DMA_NONE);

for (i = 0; i < nents; i++, sg++ ) {
BUG_ON(!sg->page);
BUG_ON(!sg_page(sg));

sg->dma_address = page_to_phys(sg->page) + sg->offset;
consistent_sync(page_address(sg->page) + sg->offset,
sg->length, direction);
sg->dma_address = sg_phys(sg);
consistent_sync(sg_virt(sg), sg->length, direction);
}

return nents;
Expand Down Expand Up @@ -128,8 +127,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
{
int i;
for (i = 0; i < nelems; i++, sg++)
consistent_sync(page_address(sg->page) + sg->offset,
sg->length, dir);
consistent_sync(sg_virt(sg), sg->length, dir);
}

static inline void
Expand All @@ -138,8 +136,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
{
int i;
for (i = 0; i < nelems; i++, sg++)
consistent_sync(page_address(sg->page) + sg->offset,
sg->length, dir);
consistent_sync(sg_virt(sg), sg->length, dir);
}
static inline int
dma_mapping_error(dma_addr_t dma_addr)
Expand Down

0 comments on commit 0b5a1ca

Please sign in to comment.