Commit dee9ba82 authored by Jens Axboe's avatar Jens Axboe

arm: sg fallout

Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 4fcc47a0
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include <linux/mm.h> /* need struct page */ #include <linux/mm.h> /* need struct page */
#include <asm/scatterlist.h> #include <linux/scatterlist.h>
/* /*
* DMA-consistent mapping functions. These allocate/free a region of * DMA-consistent mapping functions. These allocate/free a region of
...@@ -274,8 +274,8 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, ...@@ -274,8 +274,8 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
for (i = 0; i < nents; i++, sg++) { for (i = 0; i < nents; i++, sg++) {
char *virt; char *virt;
sg->dma_address = page_to_dma(dev, sg->page) + sg->offset; sg->dma_address = page_to_dma(dev, sg_page(sg)) + sg->offset;
virt = page_address(sg->page) + sg->offset; virt = sg_virt(sg);
if (!arch_is_coherent()) if (!arch_is_coherent())
dma_cache_maint(virt, sg->length, dir); dma_cache_maint(virt, sg->length, dir);
...@@ -371,7 +371,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents, ...@@ -371,7 +371,7 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nents,
int i; int i;
for (i = 0; i < nents; i++, sg++) { for (i = 0; i < nents; i++, sg++) {
char *virt = page_address(sg->page) + sg->offset; char *virt = sg_virt(sg);
if (!arch_is_coherent()) if (!arch_is_coherent())
dma_cache_maint(virt, sg->length, dir); dma_cache_maint(virt, sg->length, dir);
} }
...@@ -384,7 +384,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents, ...@@ -384,7 +384,7 @@ dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nents,
int i; int i;
for (i = 0; i < nents; i++, sg++) { for (i = 0; i < nents; i++, sg++) {
char *virt = page_address(sg->page) + sg->offset; char *virt = sg_virt(sg);
if (!arch_is_coherent()) if (!arch_is_coherent())
dma_cache_maint(virt, sg->length, dir); dma_cache_maint(virt, sg->length, dir);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment