Red Hat Bugzilla – Bug 88818
Kernel module doesn't compile in Red Hat (remap_page_range)
Last modified: 2007-04-18 12:53:02 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
Description of problem:
It appears that the RedHat version of the kernel (2.4.20-8) has changed the
arguments to the remap_page_range() API such that my module will not compile.
The RedHat kernel has an additional parameter in the call, that causes my module
to compile everywhere but against RedHat's kernel.
Since the kernel version number is the same, how can I detect what version of
this system call I need to use? Why would RedHat make such a fundamental change
in the API that causes a rift in the kernel version from the kernel.org version?
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Compare the $(KERNEL)/include/linux/mm.h from the kernel.org version to the
please read the release notes.
btw note that this API change is part of a 2.5 backport as well... just makes me
wonder why a driver would need that function though...
in addition, you are more than welcome to submit your module for inclusion in
our kernels, that way when we change such an API the driver gets fixed as well.
I have the same problem with rivatv package (http://rivatv.sourceforge.net).
During make, there appears:
gcc -D__KERNEL__ -DMODULE -Wall -Wstrict-prototypes -O2 -DCONFIG_VIDEO_RIVATV
-DCONFIG_PROC_FS -DCONFIG_VIDEO_DEV -DCONFIG_PCI -DEXPORT_SYMTAB -I.
-I/lib/modules/`uname -r`/build/include -I/lib/modules/`uname
-o v4l-riva.o -c v4l-riva.c
v4l-riva.c: In function `rivatv_mmap':
v4l-riva.c:1821: warning: passing arg 1 of `remap_page_range' makes pointer from
integer without a cast
v4l-riva.c:1821: incompatible type for argument 4 of `remap_page_range'
v4l-riva.c:1821: too few arguments to function `remap_page_range'
make: *** [v4l-riva.o] Error 1
Maybe you should add rivatv to the standard RH kernels ? ;-)
A comment on why modules use this function. The Linux Device Drivers book uses
this function in its example mmap implementation (see
http://www.xml.com/ldd/chapter/book/ch13.html). If this is incorrect, someone
should have the book updated.