Thread (17 messages) 17 messages, 7 authors, 2009-06-29

Re: PowerPC PCI DMA issues (prefetch/coherency?)

From: Leon Woestenberg <hidden>
Date: 2009-06-17 01:13:17
Also in: lkml

Possibly related (same subject, not in this thread)

Hello Benjamin,

On Wed, Jun 17, 2009 at 3:08 AM, Benjamin
Herrenschmidt[off-list ref] wrote:
On Wed, 2009-06-17 at 02:56 +0200, Leon Woestenberg wrote:
quoted
I use pci_map_sg(), have the device perform either DMA master reads or
writes to the bus address using PCIe.
After that, I use pci_unmap_sg().

My assumption is that pci_unmap_sg() either makes the cache coherent
or invalidated and thus I do not need to take further actions.
This is on a MPC83xx or 85xx system.

Is this assumption correct?
It is, as far as I understand things :-) Those APIs are fun.

You should only need the explicit sync calls if you are going to peek or
poke at the DMA mapped memory before you unmap it.
Thanks, then at least I understand things in the corr^H^H^H^Hsame way :-)

And btw, I hadn't seen any data mismatch yet.

Regards,
-- 
Leon 'likewise' Woestenberg
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help