public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: viresh.kumar@st.com (viresh kumar)
To: linux-arm-kernel@lists.infradead.org
Subject: kernel - userspace shared memory
Date: Fri, 10 Jun 2011 09:46:42 +0530	[thread overview]
Message-ID: <4DF19AAA.40309@st.com> (raw)
In-Reply-To: <BANLkTikGHoBTDyPN7T7N88DfMF1F322T2A@mail.gmail.com>

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

  reply	other threads:[~2011-06-10  4:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06 17:17 kernel - userspace shared memory Zoltan Devai
2011-06-10  4:16 ` viresh kumar [this message]
2011-06-10  6:45   ` Arnd Bergmann
2011-06-10  7:33 ` Barry Song

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=4DF19AAA.40309@st.com \
    --to=viresh.kumar@st.com \
    --cc=linux-arm-kernel@lists.infradead.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