Bug 88818 - Kernel module doesn't compile in Red Hat (remap_page_range)
Kernel module doesn't compile in Red Hat (remap_page_range)
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-14 12:09 EDT by Jerry Petree
Modified: 2007-04-18 12:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-12-16 20:42:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jerry Petree 2003-04-14 12:09:22 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):


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 12:11:02 EDT
please read the release notes.
Comment 2 Arjan van de Ven 2003-04-14 12:14:47 EDT
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 12:17:08 EDT
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 10:06:27 EDT
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 01:25:52 EDT
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.