I have a loadable module that is throwing a warning about phys_mem_access_prot when built under Ubuntu 9.10 (Linux 2.6.31-22-server).
[664] make -C /lib/modules/`uname -r`/build M=`pwd`
make: Entering directory `/usr/src/linux-headers-2.6.31-22-server'
LD /home/chuck/dev/svd/built-in.o
CC [M] /home/chuck/dev/svd/svd.o
LD [M] /home/chuck/dev/svd/svd_drv.o
Building modules, stage 2.
MODPOST 1 modules
WARNING: "phys_mem_access_prot" [/home/chuck/dev/svd/svd_drv.ko] undefined!
CC /home/chuck/dev/svd/svd_drv.mod.o
LD [M] /home/chuck/dev/svd/svd_drv.ko
make: Leaving directory `/usr/src/linux-headers-2.6.31-22-server'
The function does show up in the System.map-2.6.31-22-server file
[667] grep phys_mem_access_prot /boot/System.map-2.6.31-22-server
ffffffff8103fb40 T phys_mem_access_prot
ffffffff8103fb50 T phys_mem_access_prot_allowed
and the driver loads, so I'm confused as to why modpost
is unhappy. Is this a problem because the kernel doesn't export the function with EXPORT_SYMBOL()
?