linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* mapping uncached memory
@ 2010-03-16 23:17 Budhee Jamaich
  2010-03-16 23:54 ` Russell King - ARM Linux
  0 siblings, 1 reply; 9+ messages in thread
From: Budhee Jamaich @ 2010-03-16 23:17 UTC (permalink / raw)
  To: linux-arm-kernel

hello,

we are looking for ways to map memory as uncached,
so remote devices reading/writing to this memory will see consistent data.


these are the alternatives we currently see:


1. clean cache after every write to the memory (/invalidate the cache
before every read)

this can be done using dmac_clean/inv_range and outer_clean/inv_range
just like in dma_cache_maint.
btw - what's the difference between the dmac_* and the outer_*
functions ? why both are needed ?

disadvantage: this will be needed to be called before/after every memory access





2. use pgprot_noncached when assigning vma->vm_page_prot in our
driver's mmap method


will that really work ? all memory accesses will be uncached ?








3. use dma_alloc_coherent in some way

cons: documentation says we still need to use cache clean/inv
operations, so this might not really be of any advantage. but if that
is so, what's the idea behind coherent pools of memory ? how does it
work at all ?




what do you say ?


thank you all very much in advance
budhee

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-03-23 12:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 23:17 mapping uncached memory Budhee Jamaich
2010-03-16 23:54 ` Russell King - ARM Linux
2010-03-17  4:34   ` Jamie Lokier
2010-03-17  8:02   ` Budhee Jamaich
2010-03-17  8:15     ` Russell King - ARM Linux
2010-03-17  9:09       ` Budhee Jamaich
2010-03-17 21:26       ` Colin Cross
2010-03-17 22:03         ` Catalin Marinas
2010-03-23 12:22   ` Budhee Jamaich

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).