kernel - userspace shared memory

viresh kumar viresh.kumar at st.com
Fri Jun 10 00:16:42 EDT 2011


On 06/06/2011 10:47 PM, Zoltan Devai wrote:
> Hi all,
> 
> We are having a kernel driver and a userspace application that
> communicates via shared memory. The problem is, that when the userspace
> application modifies some data in the shared memory, this modification
> is not "visible" when the kernel driver takes a look at that memory
> location (specifically this code is in a kernel timer function).
> Actually, the modification is sometimes seen, sometimes not,
> which suggests that we are having some kind of cache coherency issue.
> The strange thing is, that AFAIK we have disabled caching on the pages
> where the shared memory resides.

Which core are you using? One problem that i am aware of is, on ARMv7
"Multiple mappings of memory with different attributes is not supported".
And the result of such is unspecified.

And for that we need to allocate memory with dma_mmap_writecombine() and remap it
for virtual space with dma_mmap_writecombine().

HTH.

-- 
viresh



More information about the linux-arm-kernel mailing list