From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Paul Mackerras <paulus@samba.org>
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH] powerpc: Fix dma_map_sg() cache flushing on non coherent platforms
Date: Mon, 01 Dec 2008 15:53:40 +1100 [thread overview]
Message-ID: <20081201045413.1E539DDD0C@ozlabs.org> (raw)
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;
next reply other threads:[~2008-12-01 4:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 4:53 Benjamin Herrenschmidt [this message]
2008-12-01 16:23 ` [PATCH] powerpc: Fix dma_map_sg() cache flushing on non coherent platforms Becky Bruce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081201045413.1E539DDD0C@ozlabs.org \
--to=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).