Skip to content

Commit 2434bbb

Browse files
ozbenhpaulusmack
authored andcommitted
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 4fc665b, "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>
1 parent f6f7b52 commit 2434bbb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎arch/powerpc/kernel/dma.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
7575
for_each_sg(sgl, sg, nents, i) {
7676
sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
7777
sg->dma_length = sg->length;
78+
__dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
7879
}
7980

8081
return nents;

0 commit comments

Comments
 (0)