linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* remap_page_range vs. map_user_kiobuf
@ 2006-05-18 17:43 Stephen Williams
  0 siblings, 0 replies; only message in thread
From: Stephen Williams @ 2006-05-18 17:43 UTC (permalink / raw)
  To: linuxppc-embedded


My setup is Linux 2.4.33 w/ bigphysarea patch. My application is
using a virtual device driver to mmap a bigphysarea chunk, which
uses the remap_page_range function. This works well, and for my
devices that are aware of this and take advantage, the contiguous
physical memory is a real boon.

However, I also have a device driver that is not made specifically
aware of this heap. In its "read" method, it uses a map_user_kiobuf
to map user memory into the kernel. I do this as part of preparing
to DMA the read. This driver gets a -EFAULT back from map_user_kiobuf
when it is passed a user buffer that is mapped from the bigphysarea
heap.

It appears that get_user_pages (in mm/memory.c) does not like the
VM_RESERVED flag and returns -EFAULT if it tries to get reserved
pages in this manner. Am I reading this right?

Is there a way I can map the bigphysarea heap into user space such
that map_user_kiobuf works on these heaps, or am I stuck with
making all drivers aware of this bigphysarea heap?

(This is an embedded system, so this is possible to do, if painful.)

-- 
Steve Williams                "The woods are lovely, dark and deep.
steve at icarus.com           But I have promises to keep,
http://www.icarus.com         and lines to code before I sleep,
http://www.picturel.com       And lines to code before I sleep."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-18 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-18 17:43 remap_page_range vs. map_user_kiobuf Stephen Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).