From: Steve Rossi <srossi@labs.mot.com>
To: Embedded Linux PPC List <linuxppc-embedded@lists.linuxppc.org>
Subject: mmap & no cache regions
Date: Tue, 13 Nov 2001 15:41:46 -0600 [thread overview]
Message-ID: <3BF1939A.B96072AC@labs.mot.com> (raw)
Hi All -
I'm writing a driver for custom hardware on an 8xx based system. I'm
using MontaVista's Journeyman 2.0 (2.4.2 kernel). The driver uses
consistent_alloc to allocate a region of memory which is used for DMA. I
mmap that region to user space (using remap_page_range) such that the
user-level application can directly access the data that has been DMA'd
from the device. I learned that consistent_alloc is not sufficent to
guarantee cache coherency on the mmaped region - in fact I had to mark
these pages PAGE_NO_CACHE in the user space application's memory map as
well. Having figured that out, it all works great now - but my question
is: do I need to pay attention to how I deallocate and unmap that
space? I use consistent_free in the driver so that takes care of marking
the pages cacheable again in the kernel level mapping - but is it safe
to assume that the application's memory map will be destroyed so I don't
have to worry about marking the pages in that map as cacheable again?
Thanks,
Steve
--
-------------------------------------------------------
Steven K. Rossi srossi@labs.mot.com
Staff Engineer
Multimedia Communications Research Laboratory
Motorola Labs
-------------------------------------------------------
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next reply other threads:[~2001-11-13 21:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-13 21:41 Steve Rossi [this message]
2001-11-16 5:39 ` mmap & no cache regions Dan Malek
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=3BF1939A.B96072AC@labs.mot.com \
--to=srossi@labs.mot.com \
--cc=linuxppc-embedded@lists.linuxppc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.