remap_page_range vs. map_user_kiobuf

Stephen Williams steve at icarus.com
Fri May 19 03:43:08 EST 2006


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."




More information about the Linuxppc-embedded mailing list