FreeBSD Bugzilla – Attachment 186605 Details for
Bug 222504
[linuxkpi] Support compat_ioctl (for 32-bit drm)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
linuxkpi_compat.patch
linuxkpi_compat.patch (text/plain), 2.07 KB, created by
Val Packett
on 2017-09-21 21:43:00 UTC
(
hide
)
Description:
linuxkpi_compat.patch
Filename:
MIME Type:
Creator:
Val Packett
Created:
2017-09-21 21:43:00 UTC
Size:
2.07 KB
patch
obsolete
>diff --git i/sys/compat/linuxkpi/common/include/linux/fs.h w/sys/compat/linuxkpi/common/include/linux/fs.h >index 31ab194e5b7..d4d8e10474f 100644 >--- i/sys/compat/linuxkpi/common/include/linux/fs.h >+++ w/sys/compat/linuxkpi/common/include/linux/fs.h >@@ -137,6 +137,7 @@ struct file_operations { > ssize_t (*write)(struct file *, const char __user *, size_t, loff_t *); > unsigned int (*poll) (struct file *, struct poll_table_struct *); > long (*unlocked_ioctl)(struct file *, unsigned int, unsigned long); >+ long (*compat_ioctl)(struct file *, unsigned int, unsigned long); > int (*mmap)(struct file *, struct vm_area_struct *); > int (*open)(struct inode *, struct file *); > int (*release)(struct inode *, struct file *); >@@ -157,7 +158,6 @@ struct file_operations { > int (*readdir)(struct file *, void *, filldir_t); > int (*ioctl)(struct inode *, struct file *, unsigned int, > unsigned long); >- long (*compat_ioctl)(struct file *, unsigned int, unsigned long); > int (*flush)(struct file *, fl_owner_t id); > int (*fsync)(struct file *, struct dentry *, int datasync); > int (*aio_fsync)(struct kiocb *, int datasync); >diff --git i/sys/compat/linuxkpi/common/src/linux_compat.c w/sys/compat/linuxkpi/common/src/linux_compat.c >index ce2cf2e75a4..4d7fd6ca5cf 100644 >--- i/sys/compat/linuxkpi/common/src/linux_compat.c >+++ w/sys/compat/linuxkpi/common/src/linux_compat.c >@@ -906,10 +906,21 @@ linux_dev_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, > /* fetch user-space pointer */ > data = *(void **)data; > } >- if (filp->f_op->unlocked_ioctl) >- error = -filp->f_op->unlocked_ioctl(filp, cmd, (u_long)data); >- else >- error = ENOTTY; >+#if defined(__amd64__) >+ if (td->td_proc->p_elf_machine == EM_386) { >+ if (filp->f_op->compat_ioctl) >+ error = -filp->f_op->compat_ioctl(filp, cmd, (u_long)data); >+ else >+ error = ENOTTY; >+ } else { >+#endif >+ if (filp->f_op->unlocked_ioctl) >+ error = -filp->f_op->unlocked_ioctl(filp, cmd, (u_long)data); >+ else >+ error = ENOTTY; >+#if defined(__amd64__) >+ } >+#endif > if (size > 0) { > current->bsd_ioctl_data = NULL; > current->bsd_ioctl_len = 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 222504
: 186605