Bug 88818 - Kernel module doesn't compile in Red Hat (remap_page_range)
Summary: Kernel module doesn't compile in Red Hat (remap_page_range)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-04-14 16:09 UTC by Jerry Petree
Modified: 2007-04-18 16:53 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-12-17 01:42:43 UTC
Embargoed:


Attachments (Terms of Use)

Description Jerry Petree 2003-04-14 16:09:22 UTC
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):


How reproducible:
Always

Steps to Reproduce:
1. Compare the $(KERNEL)/include/linux/mm.h from the kernel.org version to the
RedHat version.


Additional info:

Comment 1 Arjan van de Ven 2003-04-14 16:11:02 UTC
please read the release notes.


Comment 2 Arjan van de Ven 2003-04-14 16:14:47 UTC
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...

Comment 3 Arjan van de Ven 2003-04-14 16:17:08 UTC
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.

Comment 4 Vaclav "sHINOBI" Misek 2003-07-17 14:06:27 UTC
Hi,
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
-r`/build/drivers/media/video
-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 ? ;-)

Comment 5 Aaron Holtzman 2003-08-02 05:25:52 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.