mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Bhuvan Kumar MITTAL <bhuvan.mittal@st.com>
Cc: <linux-kernel@vger.kernel.org>, <bhuvan.mittal@st.com>
Subject: Re: How to make mmap'ed kernel buffer non-cacheable
Date: Fri, 20 Apr 2007 14:43:12 +0100	[thread overview]
Message-ID: <20070420144312.74ec1ebd@the-village.bc.nu> (raw)
In-Reply-To: <000201c7834b$dda8c6c0$142ec70a@dlh.st.com>

On Fri, 20 Apr 2007 18:30:25 +0530
Bhuvan Kumar MITTAL <bhuvan.mittal@st.com> wrote:

> Hi,
>   I am working on an audio device driver development on Linux. I have a kernel buffer which I have mapped to user space using mmap call from user space. My problem is that the data which comes to the kernel buffer is getting dropped in user space and I get only 50-60% of the data which is randomly ordered. The user to kernel level buffer address translation code is fine and I suspect this data dropping is occurring coz the kernel buffer is cacheable. Please suggest me some way of making the entire buffer non cacheable. I am stuck on this for quite a while now. 

The dma mapping API (or the PCI equivalent) provide the neccessary
behaviours for DMA receive, DMA send and consistent memory space in a
portable fashion.

That may not be done using uncachable memory in all cases as not all
processors even support uncacheable memory spaces.

If you are using the ALSA core routines (snd_dma_alloc_coherent) then
ALSA already uses dma_alloc_coherent to ensure the memory is allocated
for the appropriate use and will be kernel marked uncached.

  reply	other threads:[~2007-04-20 13:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20 13:00 Bhuvan Kumar MITTAL
2007-04-20 13:43 ` Alan Cox [this message]
2007-04-23  4:11   ` Bhuvan Kumar MITTAL
2007-04-23  4:25     ` Nick Piggin
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
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=20070420144312.74ec1ebd@the-village.bc.nu \
    --to=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

all inboxes | Powered by JetHome®