* [PATCH] powerpc: Fix dma_map_sg() cache flushing on non coherent platforms
@ 2008-12-01 4:53 Benjamin Herrenschmidt
2008-12-01 16:23 ` Becky Bruce
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2008-12-01 4:53 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
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.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Oops .. nobody spotted that when Becky patches went in !
Paul: This is a 2.6.28 regression and should be merged asap
arch/powerpc/kernel/dma.c | 1 +
1 file changed, 1 insertion(+)
--- linux-work.orig/arch/powerpc/kernel/dma.c 2008-12-01 15:44:55.000000000 +1100
+++ linux-work/arch/powerpc/kernel/dma.c 2008-12-01 15:45:13.000000000 +1100
@@ -75,6 +75,7 @@ static int dma_direct_map_sg(struct devi
for_each_sg(sgl, sg, nents, i) {
sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
sg->dma_length = sg->length;
+ __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
}
return nents;
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] powerpc: Fix dma_map_sg() cache flushing on non coherent platforms
2008-12-01 4:53 [PATCH] powerpc: Fix dma_map_sg() cache flushing on non coherent platforms Benjamin Herrenschmidt
@ 2008-12-01 16:23 ` Becky Bruce
0 siblings, 0 replies; 2+ messages in thread
From: Becky Bruce @ 2008-12-01 16:23 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev, Paul Mackerras
On Nov 30, 2008, at 10:53 PM, Benjamin Herrenschmidt wrote:
> 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.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
Sins of omission are always the hardest to catch..... My apologies,
and thanks!
-B
>
> ---
>
> Oops .. nobody spotted that when Becky patches went in !
>
> Paul: This is a 2.6.28 regression and should be merged asap
>
> arch/powerpc/kernel/dma.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- linux-work.orig/arch/powerpc/kernel/dma.c 2008-12-01
> 15:44:55.000000000 +1100
> +++ linux-work/arch/powerpc/kernel/dma.c 2008-12-01
> 15:45:13.000000000 +1100
> @@ -75,6 +75,7 @@ static int dma_direct_map_sg(struct devi
> for_each_sg(sgl, sg, nents, i) {
> sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev);
> sg->dma_length = sg->length;
> + __dma_sync_page(sg_page(sg), sg->offset, sg->length, direction);
> }
>
> return nents;
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-01 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01 4:53 [PATCH] powerpc: Fix dma_map_sg() cache flushing on non coherent platforms Benjamin Herrenschmidt
2008-12-01 16:23 ` Becky Bruce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).