提交 15aedea4 编写于 作者: F FUJITA Tomonori 提交者: Joerg Roedel

dma-debug: use sg_dma_address accessor instead of using dma_address directly

Architectures might not have dma_address in struct scatterlist (PARISC
doesn't). Directly accessing to dma_address in struct scatterlist is
wrong; we need to use sg_dma_address() accesssor instead.
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: NJoerg Roedel <joerg.roedel@amd.com>
上级 ed888aef
...@@ -840,7 +840,7 @@ void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, ...@@ -840,7 +840,7 @@ void debug_dma_map_sg(struct device *dev, struct scatterlist *sg,
entry->dev = dev; entry->dev = dev;
entry->paddr = sg_phys(s); entry->paddr = sg_phys(s);
entry->size = s->length; entry->size = s->length;
entry->dev_addr = s->dma_address; entry->dev_addr = sg_dma_address(s);
entry->direction = direction; entry->direction = direction;
entry->sg_call_ents = nents; entry->sg_call_ents = nents;
entry->sg_mapped_ents = mapped_ents; entry->sg_mapped_ents = mapped_ents;
...@@ -872,7 +872,7 @@ void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, ...@@ -872,7 +872,7 @@ void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist,
.type = dma_debug_sg, .type = dma_debug_sg,
.dev = dev, .dev = dev,
.paddr = sg_phys(s), .paddr = sg_phys(s),
.dev_addr = s->dma_address, .dev_addr = sg_dma_address(s),
.size = s->length, .size = s->length,
.direction = dir, .direction = dir,
.sg_call_ents = 0, .sg_call_ents = 0,
...@@ -996,7 +996,7 @@ void debug_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, ...@@ -996,7 +996,7 @@ void debug_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
return; return;
for_each_sg(sg, s, nelems, i) { for_each_sg(sg, s, nelems, i) {
check_sync(dev, s->dma_address, s->dma_length, 0, check_sync(dev, sg_dma_address(s), s->dma_length, 0,
direction, true); direction, true);
} }
} }
...@@ -1012,7 +1012,7 @@ void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, ...@@ -1012,7 +1012,7 @@ void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
return; return;
for_each_sg(sg, s, nelems, i) { for_each_sg(sg, s, nelems, i) {
check_sync(dev, s->dma_address, s->dma_length, 0, check_sync(dev, sg_dma_address(s), s->dma_length, 0,
direction, false); direction, false);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册