do_mmap() question

Jim Garlick (garlick@llnl.gov)
Tue, 21 Sep 1999 10:29:56 -0700 (PDT)


Greetings,

I need to create a user mapping to some SDRAM on a PCI board, but I can't
do it via a regular file operation like mmap() or ioctl(). Instead, the
mapping should be a side-effect of a device-specific system call I have added.

Further, I want the mapping to have its own vma so I can override the vm_ops
and wire in my SDRAM allocator.

The best way I can see is to dummy up a struct file, wire f_op->mmap to my
own mmap, pass that to do_mmap(), then override vm_ops in my mmap function.
Yuck! But neither remap_page_range() nor anonymous do_mmap() result in a
unique vma whose vm_ops I can override.

What's the right way to do this? Am I just trying to be too wierd?

Thanks in advance,

Jim

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