long (*compat_ioctl)(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned long arg);
implement ioctl processing for 32 bit process on 64 bit system
Optional
二、What is compat_ioctl
There is one more method called as "compat_ioctl()" that a 64 bit driver
has to implement. It gets called when 64 bit kernel gets ioctl() call
from 32 bit user.
Tasks to be done by compat_ioctl() :
1. Acquire BKL, since kernel calls compat_ioctl without BKL.
2. 32 to 64 bit conversion for long and pointer objects passed by user
3. Process input data, get results.
4. 64 to 32 bit conversion in order to pass the output data back to user
5. Release BKL
三、中文档案
Linux 64Bit 下的 ioctl和compat_ioctl ioctl32 Unknown cmd fd
前段时间将我们的程序移植到Mips64的Linux 2.6环境下,做可行性试验。
由于用户态程程序规模太大,而且之前没有对64bit的情况做考虑&#