Dear All,
Need some urgent help in installing a very old PCI card under Linux (RH) kernel 2.4.20-8smp. Can anyone help ?
Problem is as follows. We have a high speed data acquisition system based on a 16
bit 4 port PCI card purchased 7-8 years back. One of our colleagues wrote the device
driver (a pretty good one at that) as none was available and compiled it for RH6 prevailing
kernel. The system has worked fine since then.
Recently, I wanted to move the system to 2.4.20-8 kernel and encountered some problems.
First, I discovered that "remap_page_range" function's prototype had changed from 3 arguments to 4.
This was simple to fix and the source code compiled after suitable modification and the
card worked has worked fine last three months.
Now, I need to move to an SMP kernel (2.4.20-8smp) and I find that a compilation for this
results in a large number of warnings and error messages. Not being an expert on Linux,
it is quite
. Can you guys help and tell me what I am doing wrong ?
The compile line and the errors are listed below. The source of the driver does not
fit in the allowable message length, but I can send it if required , separately.
Thanks,
B C Joshi
--
---------------------------------------------------------------------------------------------------------------
------
I am compiling using
---------------------------------------------------------------------------------------------------------------
------
gcc -D__KERNEL__ -DMODULE -I/usr/src/linux-2.4/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe
-mcpu=i686 -c pcidev24.rh9.c
---------------------------------------------------------------------------------------------------------------
-------
I get the following error messages
-----------------------------------------------------------------------------------------------------------------------
./compile_module pcidev24.rh9smp.c
In file included from /usr/include/linux/fs.h:23,
from /usr/include/linux/capability.h:17,
from /usr/include/linux/binfmts.h:5,
from /usr/include/linux/sched.h:9,
from pcidev24.rh9smp.c:33:
/usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland!
In file included from /usr/include/linux/sched.h:14,
from pcidev24.rh9smp.c:33:
/usr/include/linux/timex.h:173: field `time' has incomplete type
In file included from /usr/include/linux/bitops.h:69,
from /usr/include/asm/system.h:7,
from /usr/include/linux/sched.h:16,
from pcidev24.rh9smp.c:33:
/usr/include/asm/bitops.h:327:2: warning: #warning This includefile is not available on all architectures.
/usr/include/asm/bitops.h:328:2: warning: #warning Using kernel headers in userspace: atomicity not guaranteed
In file included from /usr/include/linux/signal.h:4,
from /usr/include/linux/sched.h:25,
from pcidev24.rh9smp.c:33:
/usr/include/asm/signal.h:107: parse error before "sigset_t"
/usr/include/asm/signal.h:110: parse error before '}' token
In file included from /usr/include/linux/sched.h:81,
from pcidev24.rh9smp.c:33:
/usr/include/linux/timer.h:45: parse error before "spinlock_t"
/usr/include/linux/timer.h:53: parse error before '}' token
/usr/include/linux/timer.h:67: parse error before "tvec_base_t"
/usr/include/linux/timer.h:101: parse error before "tvec_bases"
/usr/include/linux/timer.h: In function `init_timer':
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:105: dereferencing pointer to incomplete type
/usr/include/linux/timer.h:106: dereferencing pointer to incomplete type
/usr/include/linux/timer.h: In function `timer_pending':
/usr/include/linux/timer.h:121: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:44:25: asm/uaccess.h: No such file or directory
pcidev24.rh9smp.c: In function `setup_dma':
pcidev24.rh9smp.c:261: warning: implicit declaration of function `virt_to_phys'
pcidev24.rh9smp.c: In function `take_new_task':
pcidev24.rh9smp.c:299: warning: implicit declaration of function `printk'
pcidev24.rh9smp.c: In function `dev_irq_server':
pcidev24.rh9smp.c:519: warning: implicit declaration of function `do_gettimeofday'
pcidev24.rh9smp.c: In function `dev_open':
pcidev24.rh9smp.c:961: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:969: dereferencing pointer to incomplete type
pcidev24.rh9smp.c: In function `dev_release':
pcidev24.rh9smp.c:999: dereferencing pointer to incomplete type
pcidev24.rh9smp.c: In function `dev_read':
pcidev24.rh9smp.c:1026: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1030: warning: implicit declaration of function `verify_area'
pcidev24.rh9smp.c:1030: `VERIFY_WRITE' undeclared (first use in this function)
pcidev24.rh9smp.c:1030: (Each undeclared identifier is reported only once
pcidev24.rh9smp.c:1030: for each function it appears in.)
pcidev24.rh9smp.c:1045: warning: implicit declaration of function `copy_to_user'
pcidev24.rh9smp.c: In function `dev_write':
pcidev24.rh9smp.c:1076: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1085: `VERIFY_READ' undeclared (first use in this function)
pcidev24.rh9smp.c:1095: warning: implicit declaration of function `copy_from_user'
pcidev24.rh9smp.c: In function `gmrt_corr_transfer':
pcidev24.rh9smp.c:1145: `VERIFY_READ' undeclared (first use in this function)
pcidev24.rh9smp.c:1148: `VERIFY_WRITE' undeclared (first use in this function)
pcidev24.rh9smp.c: In function `dev_ioctl':
pcidev24.rh9smp.c:1216: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1232: `VERIFY_READ' undeclared (first use in this function)
pcidev24.rh9smp.c:1232: `VERIFY_WRITE' undeclared (first use in this function)
pcidev24.rh9smp.c:1269: warning: implicit declaration of function `pci_read_config_dword'
pcidev24.rh9smp.c:1321: `ENOIOCTLCMD' undeclared (first use in this function)
pcidev24.rh9smp.c: At top level:
pcidev24.rh9smp.c:1325: warning: `struct vm_area_struct' declared inside parameter list
pcidev24.rh9smp.c:1325: warning: its scope is only this definition or declaration, which is probably not what y
ou want
pcidev24.rh9smp.c: In function `dev_mmap':
pcidev24.rh9smp.c:1331: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1340: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1340: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1344: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1346: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1347: warning: implicit declaration of function `remap_page_range'
pcidev24.rh9smp.c:1348: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1354: dereferencing pointer to incomplete type
pcidev24.rh9smp.c: At top level:
pcidev24.rh9smp.c:1404: variable `dev_fops' has initializer but incomplete type
pcidev24.rh9smp.c:1406: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1406: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1407: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1407: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1408: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1408: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1409: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1409: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1410: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1410: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1411: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1411: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1412: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1412: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1413: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1413: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1414: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1414: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1415: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1415: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1416: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1416: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1417: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1417: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1418: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1418: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1419: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1419: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1420: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1420: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1421: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1421: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1422: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1422: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c:1424: warning: excess elements in struct initializer
pcidev24.rh9smp.c:1424: warning: (near initialization for `dev_fops')
pcidev24.rh9smp.c: In function `free_resources':
pcidev24.rh9smp.c:1433: warning: implicit declaration of function `kfree'
pcidev24.rh9smp.c:1440: warning: implicit declaration of function `free_irq'
pcidev24.rh9smp.c:1448: warning: implicit declaration of function `iounmap'
pcidev24.rh9smp.c:1454: warning: implicit declaration of function `unregister_chrdev'
pcidev24.rh9smp.c: In function `init_module':
pcidev24.rh9smp.c:1472: warning: implicit declaration of function `pci_present'
pcidev24.rh9smp.c:1477: warning: implicit declaration of function `pci_find_device'
pcidev24.rh9smp.c:1477: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1481: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1497: warning: implicit declaration of function `sprintf'
pcidev24.rh9smp.c:1498: warning: implicit declaration of function `pci_read_config_byte'
pcidev24.rh9smp.c:1505: warning: implicit declaration of function `register_chrdev'
pcidev24.rh9smp.c:1511: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1513: warning: implicit declaration of function `pci_write_config_byte'
pcidev24.rh9smp.c:1514: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1518: warning: implicit declaration of function `pci_read_config_word'
pcidev24.rh9smp.c:1520: warning: implicit declaration of function `pci_write_config_word'
pcidev24.rh9smp.c:1525: dereferencing pointer to incomplete type
pcidev24.rh9smp.c:1529: warning: implicit declaration of function `pci_write_config_dword'
pcidev24.rh9smp.c:1543: warning: implicit declaration of function `ioremap_nocache'
pcidev24.rh9smp.c:1543: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1544: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1545: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1572: warning: implicit declaration of function `request_irq'
pcidev24.rh9smp.c:1580: warning: implicit declaration of function `kmalloc'
pcidev24.rh9smp.c:1580: `GFP_KERNEL' undeclared (first use in this function)
pcidev24.rh9smp.c:1580: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1581: warning: assignment makes pointer from integer without a cast
pcidev24.rh9smp.c:1587: warning: assignment makes pointer from integer without a cast
/usr/include/asm/irq.h: At top level:
pcidev24.rh9smp.c:1404: storage size of `dev_fops' isn't known
-------------------------------------------------------------------------------
Can Anyone help please ?
B C Joshi