Subject: Re: mmap() from kernel to user
To: None <kamalp@acm.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 11/22/2004 19:06:28
Kamal R. Prasad wrote:
> 
> Yes -I do want to use mmap(). Since driver and userland library are in 
> different address spaces, I do not know how to give userland  ref to the 
>  block of memory. The only way I am aware of is to give the filename of 
> the mmap()'ed file i.e. not using anon_map, but that would mean using 
> the filesystem -which I want to avoid.

So it sounds like you do want to open the device and then mmap() it.
There is no filesystem involved in that.  Just the mmap() "method" for
the device driver that gives the address for each mapped block.
And then your driver has to make sure that the kernel buffer is kept
up-to-date, probably by reading from the device as fast as possible.

	-- Lennart