Re: help on driver's nopage mmap method

From: Steven Rostedt
Date: Wed Dec 22 2004 - 07:51:57 EST

On Tue, 2004-12-21 at 21:23 -0800, John Wang wrote:
> Hi, I have been struggling for a couple of days about
> a problem of using nopage method to mmap memory from
> driver to user application.
> What I try to do is very simple - just to get the
> simplest case to work, but I always get some junk in
> user app (to be more specific, always 0xFF in the mmap
> the memory area). I don't know what is wrong here - it
> appears perfectly normal (compared to the examples in
> the book Linux Device Driver). The kernel is 2.4.2
> running on Intel x86 platform.
> The program is very simple so I attached here (header
> includes are ignored here to shorten the length).
> Please CC me directly if anyone has answer since I am
> not subscribed to the mailing list. Thanks in advance.

I just tried your program on both 2.4.20 and 2.6.9 and it works fine.
Kernel 2.4.2 is very old, you might want to try a different kernel.

-- Steve

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at