From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Bhuvan Kumar MITTAL <bhuvan.mittal@st.com>
Cc: "'Alan Cox'" <alan@lxorguk.ukuu.org.uk>, linux-kernel@vger.kernel.org
Subject: Re: How to make mmap'ed kernel buffer non-cacheable
Date: Mon, 23 Apr 2007 14:25:56 +1000 [thread overview]
Message-ID: <462C3554.5000906@yahoo.com.au> (raw)
In-Reply-To: <008e01c7855d$7af41de0$142ec70a@dlh.st.com>
Bhuvan Kumar MITTAL wrote:
> Hi Alan,
>
> I believe that dma_alloc_coherent will mark the kernel buffer as uncached at alocation time.
> But that is not my intention. I have mapped some user space memory to the kernel buffer and I wish to ensure that the contents of both are coherent and correctly ordered.
>
> In other words I wish to flush the contents of the kernel buffer to user space as soon as new data is available in my kernel buffer. How to do that? Will doing mysnc from the user space help?
msync is only for pagecache. If you modify user mapped RAM from the kernel, or wish
to read user modified RAM from the kernel, you should issue a flush_dcache_page after
and before, respectively. See Documentation/cachetlb.h.
Does that fix it? What are the details of your platform?
--
SUSE Labs, Novell Inc.
next prev parent reply other threads:[~2007-04-23 4:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-20 13:00 How to make mmap'ed kernel buffer non-cacheable Bhuvan Kumar MITTAL
2007-04-20 13:43 ` Alan Cox
2007-04-23 4:11 ` Bhuvan Kumar MITTAL
2007-04-23 4:25 ` Nick Piggin [this message]
2007-05-01 3:58 ` Bhuvan Kumar MITTAL
2007-05-01 12:09 ` Nick Piggin
2007-05-02 8:23 ` Bhuvan Kumar MITTAL
2007-05-02 8:45 ` Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2007-04-20 13:32 Daniel J Blueman
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=462C3554.5000906@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bhuvan.mittal@st.com \
--cc=linux-kernel@vger.kernel.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