Thread (64 messages) read the whole thread 64 messages, 5 authors, 2010-05-28
STALE5908d

[PATCH 2/8] ARM: Implement read/write for ownership in theARMv6 DMA cache ops

From: Russell King - ARM Linux <hidden>
Date: 2010-05-17 07:43:29

On Mon, May 17, 2010 at 10:34:36AM +0300, Ronen Shitrit wrote:
After some more thinking, I think I found the problem...

DMA for receive should operate as follows:
1) CPU will map (invalidate) the buffers for the DMA
2) DMA will place the buffers and ack the CPU
3) The CPU will call unmap which will invalidate the buffers again


I can only think of one problematic scenario:
- After 1 and before 2: 
	CPU0 did spec prefetch for address x 
- After 2: 
	CPU0 is doing inv: lock int, ldr x, 
		str x (addr x is marked dirty with wrong data).
The data has been corrupted at this point; you don't need a second CPU.
	CPU1 at this time doing spec prefetch for x which 
		will snoop CPU0 and will cause data corruption... :(

I can assume that if I count on the Soc IO cache coherency support all
this isn't relevant, right? Or there are some issues hiding with v6 +
IO coherency?
What "IO cache coherency" ?  Are you saying that your SoC has a mode
where the DMA controller can snoop the CPU caches?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help