Time-stamp: <03/09/17 03:11:48 makino>

GRAPE-6 library on REDHAT 7.x and later

Copyright 2000- Jun Makino

pcimem.c problem

For whatever reason, the "2.4.20-x" kernel included in RedHat has several things which are different from standard 2.4.x kernels.

You need to make the following change

*** pcimem-rh.c 2003-09-17 03:01:49.000000000 +0900
--- pcimem.c    2001-12-09 18:25:54.000000000 +0900
***************
*** 270,272 ****
        vp->vm_flags |= VM_RESERVED;
!       ret = remap_page_range(vp,virtual, physical, vsize, vp->vm_page_prot);
        if (ret) return (-EAGAIN);
--- 270,272 ----
        vp->vm_flags |= VM_RESERVED;
!       ret = remap_page_range(virtual, physical, vsize, vp->vm_page_prot);
        if (ret) return (-EAGAIN);
to the file phibdd-2.4/pcimem/pcimem.c.

You may also need to change the Makefile in the same directory as follows:

< CFLAGS = -v -o $@ -c -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4/include/ -O -Wall
---
> CFLAGS = -v -o $@ -c -D__KERNEL__ -DMODULE -O -Wall
The corrected version (but not tested, since I do not have a machine with RH running right now) is here.

Thanks to: Peter Bunclark and Naohito Nakasato