Re: do_mmap() question

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 21 Sep 1999 23:45:13 +0100 (BST)


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

"device specific system call". When I hear that I worry. It means someone
didnt get the model

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

Your driver specific mmap routine can set up specific vm ops if it needs to.

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

It sounds like you are fighting the system not using it. Your PCI board
is a device. You open it, mmap it and close it. It may not be the API you
want to present to an application but that is a user space library
issue.

Alan

-
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/