Subject: Re: mmap() from kernel to user
To: Lennart Augustsson <>
From: Kamal R. Prasad <>
List: tech-kern
Date: 11/24/2004 00:29:57
Lennart Augustsson wrote:

> 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

Is there some src code using the mmap() "method" that does just that?