diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-11-30 13:53:40 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-03 02:24:08 -0500 |
commit | 2434bbb30e79468c49cff3cff6005236f55ed188 (patch) | |
tree | c6ef9842c87161cee8af075dcc7e5b0e704cc665 /arch/powerpc/kernel | |
parent | f6f7b52e2f6149d2ee365717afff315b05720162 (diff) |
powerpc: Fix dma_map_sg() cache flushing on non coherent platforms
On PowerPC 4xx or other non cache-coherent platforms, we lost the
appropriate cache flushing in dma_map_sg() when merging the 32 and
64-bit DMA code (commit 4fc665b88a79a45bae8bbf3a05563c27c7337c3d,
"powerpc: Merge 32 and 64-bit dma code"). This restores it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/dma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c index 1562daf8839a..3a6eaa876ee1 100644 --- a/arch/powerpc/kernel/dma.c +++ b/arch/powerpc/kernel/dma.c | |||
@@ -75,6 +75,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, | |||
75 | for_each_sg(sgl, sg, nents, i) { | 75 | for_each_sg(sgl, sg, nents, i) { |
76 | sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev); | 76 | sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev); |
77 | sg->dma_length = sg->length; | 77 | sg->dma_length = sg->length; |
78 | __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction); | ||
78 | } | 79 | } |
79 | 80 | ||
80 | return nents; | 81 | return nents; |