Re: remap_page_range

From: William Lee Irwin III
Date: Wed Nov 17 2004 - 21:10:35 EST


On Wed, Nov 17, 2004 at 06:43:46PM -0200, Thiago Robert dos Santos wrote:
> I'm having a problem with remap_page_range in the 2.6 kernel series. I
> use remap_page_range inside the mmap function of a module I wrote in
> order to map a given device's memory into user space.
> Apparently, everything works fine but I just can't access the device's
> memory (even tough I get a valid point from the mmap system call). This
> is the mmap function I wrote:
> static int
> pcimap_mmap (struct file *filp, struct vm_area_struct *vma)
> {

(1) set PG_reserved on all struct pages covering the physical region
(2) set VM_RESERVED|VM_IO in vma->vm_flags


-- wli
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/