diff options
author | hselasky <hselasky@FreeBSD.org> | 2015-10-29 08:28:39 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2015-10-29 08:28:39 +0000 |
commit | 97b71ce545702c6c9c80c6d958ebd7d30f656be2 (patch) | |
tree | f9937a81e1e19355726bac644f9598a290f8a9cb | |
parent | 41bbd8a7cb0ba3a86302687715c12c9cf1a4b91f (diff) | |
download | FreeBSD-src-97b71ce545702c6c9c80c6d958ebd7d30f656be2.zip FreeBSD-src-97b71ce545702c6c9c80c6d958ebd7d30f656be2.tar.gz |
Finish process of moving the LinuxKPI module into the default kernel build.
- Move all files related to the LinuxKPI into sys/compat/linuxkpi and
its subfolders.
- Update sys/conf/files and some Makefiles to use new file locations.
- Added description of COMPAT_LINUXKPI to sys/conf/NOTES which in turn
adds the LinuxKPI to all LINT builds.
- The LinuxKPI can be added to the kernel by setting the
COMPAT_LINUXKPI option. The OFED kernel option no longer builds the
LinuxKPI into the kernel. This was done to keep the build rules for
the LinuxKPI in sys/conf/files simple.
- Extend the LinuxKPI module to include support for USB by moving the
Linux USB compat from usb.ko to linuxkpi.ko.
- Bump the FreeBSD_version.
- A universe kernel build has been done.
Reviewed by: np @ (cxgb and cxgbe related changes only)
Sponsored by: Mellanox Technologies
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/atomic-long.h (renamed from sys/ofed/include/asm/atomic-long.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/atomic.h (renamed from sys/ofed/include/asm/atomic.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/byteorder.h (renamed from sys/ofed/include/asm/byteorder.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/fcntl.h (renamed from sys/ofed/include/asm/fcntl.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/io.h (renamed from sys/ofed/include/asm/io.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/pgtable.h (renamed from sys/ofed/include/asm/pgtable.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/types.h (renamed from sys/ofed/include/asm/types.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/asm/uaccess.h (renamed from sys/ofed/include/asm/uaccess.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/bitops.h (renamed from sys/ofed/include/linux/bitops.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/cache.h (renamed from sys/ofed/include/linux/cache.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/cdev.h (renamed from sys/ofed/include/linux/cdev.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/clocksource.h (renamed from sys/ofed/include/linux/clocksource.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/compat.h (renamed from sys/ofed/include/linux/compat.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/compiler.h (renamed from sys/ofed/include/linux/compiler.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/completion.h (renamed from sys/ofed/include/linux/completion.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/delay.h (renamed from sys/ofed/include/linux/delay.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/device.h (renamed from sys/ofed/include/linux/device.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/dma-attrs.h (renamed from sys/ofed/include/linux/dma-attrs.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/dma-mapping.h (renamed from sys/ofed/include/linux/dma-mapping.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/dmapool.h (renamed from sys/ofed/include/linux/dmapool.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/err.h (renamed from sys/ofed/include/linux/err.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/errno.h (renamed from sys/ofed/include/linux/errno.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/etherdevice.h (renamed from sys/ofed/include/linux/etherdevice.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/file.h (renamed from sys/ofed/include/linux/file.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/fs.h (renamed from sys/ofed/include/linux/fs.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/gfp.h (renamed from sys/ofed/include/linux/gfp.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/hardirq.h (renamed from sys/ofed/include/linux/hardirq.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/idr.h (renamed from sys/ofed/include/linux/idr.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/if_arp.h (renamed from sys/ofed/include/linux/if_arp.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/if_ether.h (renamed from sys/ofed/include/linux/if_ether.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/if_vlan.h (renamed from sys/ofed/include/linux/if_vlan.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/in.h (renamed from sys/ofed/include/linux/in.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/in6.h (renamed from sys/ofed/include/linux/in6.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/inetdevice.h (renamed from sys/ofed/include/linux/inetdevice.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/interrupt.h (renamed from sys/ofed/include/linux/interrupt.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/io-mapping.h (renamed from sys/ofed/include/linux/io-mapping.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/io.h (renamed from sys/ofed/include/linux/io.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/ioctl.h (renamed from sys/ofed/include/linux/ioctl.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/jhash.h (renamed from sys/ofed/include/linux/jhash.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/jiffies.h (renamed from sys/ofed/include/linux/jiffies.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kdev_t.h (renamed from sys/ofed/include/linux/kdev_t.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kernel.h (renamed from sys/ofed/include/linux/kernel.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kmod.h (renamed from sys/ofed/include/linux/kmod.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kobject.h (renamed from sys/ofed/include/linux/kobject.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kref.h (renamed from sys/ofed/include/linux/kref.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/kthread.h (renamed from sys/ofed/include/linux/kthread.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/ktime.h (renamed from sys/ofed/include/linux/ktime.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/list.h (renamed from sys/ofed/include/linux/list.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/lockdep.h (renamed from sys/ofed/include/linux/lockdep.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/log2.h (renamed from sys/ofed/include/linux/log2.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/math64.h (renamed from sys/ofed/include/linux/math64.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/miscdevice.h (renamed from sys/ofed/include/linux/miscdevice.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/mm.h (renamed from sys/ofed/include/linux/mm.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/module.h (renamed from sys/ofed/include/linux/module.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/moduleparam.h (renamed from sys/ofed/include/linux/moduleparam.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/mutex.h (renamed from sys/ofed/include/linux/mutex.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/net.h (renamed from sys/ofed/include/linux/net.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/netdevice.h (renamed from sys/ofed/include/linux/netdevice.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/notifier.h (renamed from sys/ofed/include/linux/notifier.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/page.h (renamed from sys/ofed/include/linux/page.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/pci.h (renamed from sys/ofed/include/linux/pci.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/poll.h (renamed from sys/ofed/include/linux/poll.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/printk.h (renamed from sys/ofed/include/linux/printk.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/radix-tree.h (renamed from sys/ofed/include/linux/radix-tree.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/random.h (renamed from sys/ofed/include/linux/random.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/rbtree.h (renamed from sys/ofed/include/linux/rbtree.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/rwlock.h (renamed from sys/ofed/include/linux/rwlock.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/rwsem.h (renamed from sys/ofed/include/linux/rwsem.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/scatterlist.h (renamed from sys/ofed/include/linux/scatterlist.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/sched.h (renamed from sys/ofed/include/linux/sched.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/semaphore.h (renamed from sys/ofed/include/linux/semaphore.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/slab.h (renamed from sys/ofed/include/linux/slab.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/socket.h (renamed from sys/ofed/include/linux/socket.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/spinlock.h (renamed from sys/ofed/include/linux/spinlock.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/string.h (renamed from sys/ofed/include/linux/string.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/sysfs.h (renamed from sys/ofed/include/linux/sysfs.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/time.h (renamed from sys/ofed/include/linux/time.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/timer.h (renamed from sys/ofed/include/linux/timer.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/types.h (renamed from sys/ofed/include/linux/types.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/uaccess.h (renamed from sys/ofed/include/linux/uaccess.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/usb.h (renamed from sys/dev/usb/usb_compat_linux.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/vmalloc.h (renamed from sys/ofed/include/linux/vmalloc.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/wait.h (renamed from sys/ofed/include/linux/wait.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/workqueue.h (renamed from sys/ofed/include/linux/workqueue.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/if_inet6.h (renamed from sys/ofed/include/net/if_inet6.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/ip.h (renamed from sys/ofed/include/net/ip.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/ipv6.h (renamed from sys/ofed/include/net/ipv6.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/netevent.h (renamed from sys/ofed/include/net/netevent.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/include/net/tcp.h (renamed from sys/ofed/include/net/tcp.h) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_compat.c (renamed from sys/ofed/include/linux/linux_compat.c) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_idr.c (renamed from sys/ofed/include/linux/linux_idr.c) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_kmod.c (renamed from sys/ofed/include/linux/linux_kmod.c) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_pci.c (renamed from sys/ofed/include/linux/linux_pci.c) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_radix.c (renamed from sys/ofed/include/linux/linux_radix.c) | 0 | ||||
-rw-r--r-- | sys/compat/linuxkpi/common/src/linux_usb.c (renamed from sys/dev/usb/usb_compat_linux.c) | 13 | ||||
-rw-r--r-- | sys/conf/NOTES | 3 | ||||
-rw-r--r-- | sys/conf/files | 26 | ||||
-rw-r--r-- | sys/conf/kern.pre.mk | 6 | ||||
-rw-r--r-- | sys/dev/usb/usb_device.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/usb_dynamic.c | 30 | ||||
-rw-r--r-- | sys/dev/usb/usb_dynamic.h | 3 | ||||
-rw-r--r-- | sys/modules/cxgb/iw_cxgb/Makefile | 1 | ||||
-rw-r--r-- | sys/modules/cxgbe/iw_cxgbe/Makefile | 1 | ||||
-rw-r--r-- | sys/modules/ibcore/Makefile | 5 | ||||
-rw-r--r-- | sys/modules/ipoib/Makefile | 5 | ||||
-rw-r--r-- | sys/modules/linuxkpi/Makefile | 11 | ||||
-rw-r--r-- | sys/modules/mlx4/Makefile | 4 | ||||
-rw-r--r-- | sys/modules/mlx4ib/Makefile | 4 | ||||
-rw-r--r-- | sys/modules/mlxen/Makefile | 3 | ||||
-rw-r--r-- | sys/modules/mthca/Makefile | 2 | ||||
-rw-r--r-- | sys/modules/rdma/krping/Makefile | 5 | ||||
-rw-r--r-- | sys/modules/usb/usb/Makefile | 2 | ||||
-rw-r--r-- | sys/sys/param.h | 2 |
113 files changed, 93 insertions, 37 deletions
diff --git a/sys/ofed/include/asm/atomic-long.h b/sys/compat/linuxkpi/common/include/asm/atomic-long.h index f522af8..f522af8 100644 --- a/sys/ofed/include/asm/atomic-long.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic-long.h diff --git a/sys/ofed/include/asm/atomic.h b/sys/compat/linuxkpi/common/include/asm/atomic.h index fc22a39..fc22a39 100644 --- a/sys/ofed/include/asm/atomic.h +++ b/sys/compat/linuxkpi/common/include/asm/atomic.h diff --git a/sys/ofed/include/asm/byteorder.h b/sys/compat/linuxkpi/common/include/asm/byteorder.h index 7168e49..7168e49 100644 --- a/sys/ofed/include/asm/byteorder.h +++ b/sys/compat/linuxkpi/common/include/asm/byteorder.h diff --git a/sys/ofed/include/asm/fcntl.h b/sys/compat/linuxkpi/common/include/asm/fcntl.h index f24624e..f24624e 100644 --- a/sys/ofed/include/asm/fcntl.h +++ b/sys/compat/linuxkpi/common/include/asm/fcntl.h diff --git a/sys/ofed/include/asm/io.h b/sys/compat/linuxkpi/common/include/asm/io.h index 24d350f..24d350f 100644 --- a/sys/ofed/include/asm/io.h +++ b/sys/compat/linuxkpi/common/include/asm/io.h diff --git a/sys/ofed/include/asm/pgtable.h b/sys/compat/linuxkpi/common/include/asm/pgtable.h index 7bdab1c..7bdab1c 100644 --- a/sys/ofed/include/asm/pgtable.h +++ b/sys/compat/linuxkpi/common/include/asm/pgtable.h diff --git a/sys/ofed/include/asm/types.h b/sys/compat/linuxkpi/common/include/asm/types.h index fb2fd56..fb2fd56 100644 --- a/sys/ofed/include/asm/types.h +++ b/sys/compat/linuxkpi/common/include/asm/types.h diff --git a/sys/ofed/include/asm/uaccess.h b/sys/compat/linuxkpi/common/include/asm/uaccess.h index ce90355..ce90355 100644 --- a/sys/ofed/include/asm/uaccess.h +++ b/sys/compat/linuxkpi/common/include/asm/uaccess.h diff --git a/sys/ofed/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 8b985a9..8b985a9 100644 --- a/sys/ofed/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h diff --git a/sys/ofed/include/linux/cache.h b/sys/compat/linuxkpi/common/include/linux/cache.h index a269e55..a269e55 100644 --- a/sys/ofed/include/linux/cache.h +++ b/sys/compat/linuxkpi/common/include/linux/cache.h diff --git a/sys/ofed/include/linux/cdev.h b/sys/compat/linuxkpi/common/include/linux/cdev.h index 9d5b3fb..9d5b3fb 100644 --- a/sys/ofed/include/linux/cdev.h +++ b/sys/compat/linuxkpi/common/include/linux/cdev.h diff --git a/sys/ofed/include/linux/clocksource.h b/sys/compat/linuxkpi/common/include/linux/clocksource.h index 7a4835c..7a4835c 100644 --- a/sys/ofed/include/linux/clocksource.h +++ b/sys/compat/linuxkpi/common/include/linux/clocksource.h diff --git a/sys/ofed/include/linux/compat.h b/sys/compat/linuxkpi/common/include/linux/compat.h index 74ce9ec..74ce9ec 100644 --- a/sys/ofed/include/linux/compat.h +++ b/sys/compat/linuxkpi/common/include/linux/compat.h diff --git a/sys/ofed/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h index 6381358..6381358 100644 --- a/sys/ofed/include/linux/compiler.h +++ b/sys/compat/linuxkpi/common/include/linux/compiler.h diff --git a/sys/ofed/include/linux/completion.h b/sys/compat/linuxkpi/common/include/linux/completion.h index 7cfb10d..7cfb10d 100644 --- a/sys/ofed/include/linux/completion.h +++ b/sys/compat/linuxkpi/common/include/linux/completion.h diff --git a/sys/ofed/include/linux/delay.h b/sys/compat/linuxkpi/common/include/linux/delay.h index da38662..da38662 100644 --- a/sys/ofed/include/linux/delay.h +++ b/sys/compat/linuxkpi/common/include/linux/delay.h diff --git a/sys/ofed/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index 3459a5c..3459a5c 100644 --- a/sys/ofed/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h diff --git a/sys/ofed/include/linux/dma-attrs.h b/sys/compat/linuxkpi/common/include/linux/dma-attrs.h index fda2282..fda2282 100644 --- a/sys/ofed/include/linux/dma-attrs.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-attrs.h diff --git a/sys/ofed/include/linux/dma-mapping.h b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h index da08751..da08751 100644 --- a/sys/ofed/include/linux/dma-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/dma-mapping.h diff --git a/sys/ofed/include/linux/dmapool.h b/sys/compat/linuxkpi/common/include/linux/dmapool.h index 3ea2d5b..3ea2d5b 100644 --- a/sys/ofed/include/linux/dmapool.h +++ b/sys/compat/linuxkpi/common/include/linux/dmapool.h diff --git a/sys/ofed/include/linux/err.h b/sys/compat/linuxkpi/common/include/linux/err.h index 2366130..2366130 100644 --- a/sys/ofed/include/linux/err.h +++ b/sys/compat/linuxkpi/common/include/linux/err.h diff --git a/sys/ofed/include/linux/errno.h b/sys/compat/linuxkpi/common/include/linux/errno.h index a043a3d..a043a3d 100644 --- a/sys/ofed/include/linux/errno.h +++ b/sys/compat/linuxkpi/common/include/linux/errno.h diff --git a/sys/ofed/include/linux/etherdevice.h b/sys/compat/linuxkpi/common/include/linux/etherdevice.h index 12ea345..12ea345 100644 --- a/sys/ofed/include/linux/etherdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/etherdevice.h diff --git a/sys/ofed/include/linux/file.h b/sys/compat/linuxkpi/common/include/linux/file.h index b23c971..b23c971 100644 --- a/sys/ofed/include/linux/file.h +++ b/sys/compat/linuxkpi/common/include/linux/file.h diff --git a/sys/ofed/include/linux/fs.h b/sys/compat/linuxkpi/common/include/linux/fs.h index 797b816..797b816 100644 --- a/sys/ofed/include/linux/fs.h +++ b/sys/compat/linuxkpi/common/include/linux/fs.h diff --git a/sys/ofed/include/linux/gfp.h b/sys/compat/linuxkpi/common/include/linux/gfp.h index a82f30d..a82f30d 100644 --- a/sys/ofed/include/linux/gfp.h +++ b/sys/compat/linuxkpi/common/include/linux/gfp.h diff --git a/sys/ofed/include/linux/hardirq.h b/sys/compat/linuxkpi/common/include/linux/hardirq.h index b8e4c95..b8e4c95 100644 --- a/sys/ofed/include/linux/hardirq.h +++ b/sys/compat/linuxkpi/common/include/linux/hardirq.h diff --git a/sys/ofed/include/linux/idr.h b/sys/compat/linuxkpi/common/include/linux/idr.h index 9beec68..9beec68 100644 --- a/sys/ofed/include/linux/idr.h +++ b/sys/compat/linuxkpi/common/include/linux/idr.h diff --git a/sys/ofed/include/linux/if_arp.h b/sys/compat/linuxkpi/common/include/linux/if_arp.h index 6233aac..6233aac 100644 --- a/sys/ofed/include/linux/if_arp.h +++ b/sys/compat/linuxkpi/common/include/linux/if_arp.h diff --git a/sys/ofed/include/linux/if_ether.h b/sys/compat/linuxkpi/common/include/linux/if_ether.h index c89e1e2..c89e1e2 100644 --- a/sys/ofed/include/linux/if_ether.h +++ b/sys/compat/linuxkpi/common/include/linux/if_ether.h diff --git a/sys/ofed/include/linux/if_vlan.h b/sys/compat/linuxkpi/common/include/linux/if_vlan.h index 4a8808f..4a8808f 100644 --- a/sys/ofed/include/linux/if_vlan.h +++ b/sys/compat/linuxkpi/common/include/linux/if_vlan.h diff --git a/sys/ofed/include/linux/in.h b/sys/compat/linuxkpi/common/include/linux/in.h index f390c1d..f390c1d 100644 --- a/sys/ofed/include/linux/in.h +++ b/sys/compat/linuxkpi/common/include/linux/in.h diff --git a/sys/ofed/include/linux/in6.h b/sys/compat/linuxkpi/common/include/linux/in6.h index ef012dd..ef012dd 100644 --- a/sys/ofed/include/linux/in6.h +++ b/sys/compat/linuxkpi/common/include/linux/in6.h diff --git a/sys/ofed/include/linux/inetdevice.h b/sys/compat/linuxkpi/common/include/linux/inetdevice.h index 12d7544..12d7544 100644 --- a/sys/ofed/include/linux/inetdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/inetdevice.h diff --git a/sys/ofed/include/linux/interrupt.h b/sys/compat/linuxkpi/common/include/linux/interrupt.h index 4c0ad80..4c0ad80 100644 --- a/sys/ofed/include/linux/interrupt.h +++ b/sys/compat/linuxkpi/common/include/linux/interrupt.h diff --git a/sys/ofed/include/linux/io-mapping.h b/sys/compat/linuxkpi/common/include/linux/io-mapping.h index 8650dba..8650dba 100644 --- a/sys/ofed/include/linux/io-mapping.h +++ b/sys/compat/linuxkpi/common/include/linux/io-mapping.h diff --git a/sys/ofed/include/linux/io.h b/sys/compat/linuxkpi/common/include/linux/io.h index 16543ff..16543ff 100644 --- a/sys/ofed/include/linux/io.h +++ b/sys/compat/linuxkpi/common/include/linux/io.h diff --git a/sys/ofed/include/linux/ioctl.h b/sys/compat/linuxkpi/common/include/linux/ioctl.h index 6f57906..6f57906 100644 --- a/sys/ofed/include/linux/ioctl.h +++ b/sys/compat/linuxkpi/common/include/linux/ioctl.h diff --git a/sys/ofed/include/linux/jhash.h b/sys/compat/linuxkpi/common/include/linux/jhash.h index f31829e..f31829e 100644 --- a/sys/ofed/include/linux/jhash.h +++ b/sys/compat/linuxkpi/common/include/linux/jhash.h diff --git a/sys/ofed/include/linux/jiffies.h b/sys/compat/linuxkpi/common/include/linux/jiffies.h index f7bc529..f7bc529 100644 --- a/sys/ofed/include/linux/jiffies.h +++ b/sys/compat/linuxkpi/common/include/linux/jiffies.h diff --git a/sys/ofed/include/linux/kdev_t.h b/sys/compat/linuxkpi/common/include/linux/kdev_t.h index 8dea1ab..8dea1ab 100644 --- a/sys/ofed/include/linux/kdev_t.h +++ b/sys/compat/linuxkpi/common/include/linux/kdev_t.h diff --git a/sys/ofed/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h index bfc3b7d..bfc3b7d 100644 --- a/sys/ofed/include/linux/kernel.h +++ b/sys/compat/linuxkpi/common/include/linux/kernel.h diff --git a/sys/ofed/include/linux/kmod.h b/sys/compat/linuxkpi/common/include/linux/kmod.h index c943dc5..c943dc5 100644 --- a/sys/ofed/include/linux/kmod.h +++ b/sys/compat/linuxkpi/common/include/linux/kmod.h diff --git a/sys/ofed/include/linux/kobject.h b/sys/compat/linuxkpi/common/include/linux/kobject.h index 63fbc56..63fbc56 100644 --- a/sys/ofed/include/linux/kobject.h +++ b/sys/compat/linuxkpi/common/include/linux/kobject.h diff --git a/sys/ofed/include/linux/kref.h b/sys/compat/linuxkpi/common/include/linux/kref.h index de5ddaa..de5ddaa 100644 --- a/sys/ofed/include/linux/kref.h +++ b/sys/compat/linuxkpi/common/include/linux/kref.h diff --git a/sys/ofed/include/linux/kthread.h b/sys/compat/linuxkpi/common/include/linux/kthread.h index fa8e9ba..fa8e9ba 100644 --- a/sys/ofed/include/linux/kthread.h +++ b/sys/compat/linuxkpi/common/include/linux/kthread.h diff --git a/sys/ofed/include/linux/ktime.h b/sys/compat/linuxkpi/common/include/linux/ktime.h index c9fa81c..c9fa81c 100644 --- a/sys/ofed/include/linux/ktime.h +++ b/sys/compat/linuxkpi/common/include/linux/ktime.h diff --git a/sys/ofed/include/linux/list.h b/sys/compat/linuxkpi/common/include/linux/list.h index bfa7d97..bfa7d97 100644 --- a/sys/ofed/include/linux/list.h +++ b/sys/compat/linuxkpi/common/include/linux/list.h diff --git a/sys/ofed/include/linux/lockdep.h b/sys/compat/linuxkpi/common/include/linux/lockdep.h index 2738693..2738693 100644 --- a/sys/ofed/include/linux/lockdep.h +++ b/sys/compat/linuxkpi/common/include/linux/lockdep.h diff --git a/sys/ofed/include/linux/log2.h b/sys/compat/linuxkpi/common/include/linux/log2.h index a44c560..a44c560 100644 --- a/sys/ofed/include/linux/log2.h +++ b/sys/compat/linuxkpi/common/include/linux/log2.h diff --git a/sys/ofed/include/linux/math64.h b/sys/compat/linuxkpi/common/include/linux/math64.h index 2a488f1..2a488f1 100644 --- a/sys/ofed/include/linux/math64.h +++ b/sys/compat/linuxkpi/common/include/linux/math64.h diff --git a/sys/ofed/include/linux/miscdevice.h b/sys/compat/linuxkpi/common/include/linux/miscdevice.h index 96d8fe7..96d8fe7 100644 --- a/sys/ofed/include/linux/miscdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/miscdevice.h diff --git a/sys/ofed/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 3835e34..3835e34 100644 --- a/sys/ofed/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h diff --git a/sys/ofed/include/linux/module.h b/sys/compat/linuxkpi/common/include/linux/module.h index 0caa2b0..0caa2b0 100644 --- a/sys/ofed/include/linux/module.h +++ b/sys/compat/linuxkpi/common/include/linux/module.h diff --git a/sys/ofed/include/linux/moduleparam.h b/sys/compat/linuxkpi/common/include/linux/moduleparam.h index 9699b33..9699b33 100644 --- a/sys/ofed/include/linux/moduleparam.h +++ b/sys/compat/linuxkpi/common/include/linux/moduleparam.h diff --git a/sys/ofed/include/linux/mutex.h b/sys/compat/linuxkpi/common/include/linux/mutex.h index aee34cf..aee34cf 100644 --- a/sys/ofed/include/linux/mutex.h +++ b/sys/compat/linuxkpi/common/include/linux/mutex.h diff --git a/sys/ofed/include/linux/net.h b/sys/compat/linuxkpi/common/include/linux/net.h index 166b750..166b750 100644 --- a/sys/ofed/include/linux/net.h +++ b/sys/compat/linuxkpi/common/include/linux/net.h diff --git a/sys/ofed/include/linux/netdevice.h b/sys/compat/linuxkpi/common/include/linux/netdevice.h index 1b1f8bf..1b1f8bf 100644 --- a/sys/ofed/include/linux/netdevice.h +++ b/sys/compat/linuxkpi/common/include/linux/netdevice.h diff --git a/sys/ofed/include/linux/notifier.h b/sys/compat/linuxkpi/common/include/linux/notifier.h index ca750e0..ca750e0 100644 --- a/sys/ofed/include/linux/notifier.h +++ b/sys/compat/linuxkpi/common/include/linux/notifier.h diff --git a/sys/ofed/include/linux/page.h b/sys/compat/linuxkpi/common/include/linux/page.h index acc9f03..acc9f03 100644 --- a/sys/ofed/include/linux/page.h +++ b/sys/compat/linuxkpi/common/include/linux/page.h diff --git a/sys/ofed/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 54ea99c..54ea99c 100644 --- a/sys/ofed/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h diff --git a/sys/ofed/include/linux/poll.h b/sys/compat/linuxkpi/common/include/linux/poll.h index e4f7417..e4f7417 100644 --- a/sys/ofed/include/linux/poll.h +++ b/sys/compat/linuxkpi/common/include/linux/poll.h diff --git a/sys/ofed/include/linux/printk.h b/sys/compat/linuxkpi/common/include/linux/printk.h index b160594..b160594 100644 --- a/sys/ofed/include/linux/printk.h +++ b/sys/compat/linuxkpi/common/include/linux/printk.h diff --git a/sys/ofed/include/linux/radix-tree.h b/sys/compat/linuxkpi/common/include/linux/radix-tree.h index 838b81c..838b81c 100644 --- a/sys/ofed/include/linux/radix-tree.h +++ b/sys/compat/linuxkpi/common/include/linux/radix-tree.h diff --git a/sys/ofed/include/linux/random.h b/sys/compat/linuxkpi/common/include/linux/random.h index caae7b3..caae7b3 100644 --- a/sys/ofed/include/linux/random.h +++ b/sys/compat/linuxkpi/common/include/linux/random.h diff --git a/sys/ofed/include/linux/rbtree.h b/sys/compat/linuxkpi/common/include/linux/rbtree.h index c4478ca..c4478ca 100644 --- a/sys/ofed/include/linux/rbtree.h +++ b/sys/compat/linuxkpi/common/include/linux/rbtree.h diff --git a/sys/ofed/include/linux/rwlock.h b/sys/compat/linuxkpi/common/include/linux/rwlock.h index e7c6301..e7c6301 100644 --- a/sys/ofed/include/linux/rwlock.h +++ b/sys/compat/linuxkpi/common/include/linux/rwlock.h diff --git a/sys/ofed/include/linux/rwsem.h b/sys/compat/linuxkpi/common/include/linux/rwsem.h index 22ad4dc..22ad4dc 100644 --- a/sys/ofed/include/linux/rwsem.h +++ b/sys/compat/linuxkpi/common/include/linux/rwsem.h diff --git a/sys/ofed/include/linux/scatterlist.h b/sys/compat/linuxkpi/common/include/linux/scatterlist.h index 5aa8d65..5aa8d65 100644 --- a/sys/ofed/include/linux/scatterlist.h +++ b/sys/compat/linuxkpi/common/include/linux/scatterlist.h diff --git a/sys/ofed/include/linux/sched.h b/sys/compat/linuxkpi/common/include/linux/sched.h index c2d66d7..c2d66d7 100644 --- a/sys/ofed/include/linux/sched.h +++ b/sys/compat/linuxkpi/common/include/linux/sched.h diff --git a/sys/ofed/include/linux/semaphore.h b/sys/compat/linuxkpi/common/include/linux/semaphore.h index 022a016..022a016 100644 --- a/sys/ofed/include/linux/semaphore.h +++ b/sys/compat/linuxkpi/common/include/linux/semaphore.h diff --git a/sys/ofed/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h index 1b56b55..1b56b55 100644 --- a/sys/ofed/include/linux/slab.h +++ b/sys/compat/linuxkpi/common/include/linux/slab.h diff --git a/sys/ofed/include/linux/socket.h b/sys/compat/linuxkpi/common/include/linux/socket.h index a9a952e..a9a952e 100644 --- a/sys/ofed/include/linux/socket.h +++ b/sys/compat/linuxkpi/common/include/linux/socket.h diff --git a/sys/ofed/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h index 97c83e0..97c83e0 100644 --- a/sys/ofed/include/linux/spinlock.h +++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h diff --git a/sys/ofed/include/linux/string.h b/sys/compat/linuxkpi/common/include/linux/string.h index cf55b09..cf55b09 100644 --- a/sys/ofed/include/linux/string.h +++ b/sys/compat/linuxkpi/common/include/linux/string.h diff --git a/sys/ofed/include/linux/sysfs.h b/sys/compat/linuxkpi/common/include/linux/sysfs.h index e565e43..e565e43 100644 --- a/sys/ofed/include/linux/sysfs.h +++ b/sys/compat/linuxkpi/common/include/linux/sysfs.h diff --git a/sys/ofed/include/linux/time.h b/sys/compat/linuxkpi/common/include/linux/time.h index 27516a4..27516a4 100644 --- a/sys/ofed/include/linux/time.h +++ b/sys/compat/linuxkpi/common/include/linux/time.h diff --git a/sys/ofed/include/linux/timer.h b/sys/compat/linuxkpi/common/include/linux/timer.h index a794c13..a794c13 100644 --- a/sys/ofed/include/linux/timer.h +++ b/sys/compat/linuxkpi/common/include/linux/timer.h diff --git a/sys/ofed/include/linux/types.h b/sys/compat/linuxkpi/common/include/linux/types.h index c9c3728..c9c3728 100644 --- a/sys/ofed/include/linux/types.h +++ b/sys/compat/linuxkpi/common/include/linux/types.h diff --git a/sys/ofed/include/linux/uaccess.h b/sys/compat/linuxkpi/common/include/linux/uaccess.h index 87d1bab..87d1bab 100644 --- a/sys/ofed/include/linux/uaccess.h +++ b/sys/compat/linuxkpi/common/include/linux/uaccess.h diff --git a/sys/dev/usb/usb_compat_linux.h b/sys/compat/linuxkpi/common/include/linux/usb.h index 1f00d4b..1f00d4b 100644 --- a/sys/dev/usb/usb_compat_linux.h +++ b/sys/compat/linuxkpi/common/include/linux/usb.h diff --git a/sys/ofed/include/linux/vmalloc.h b/sys/compat/linuxkpi/common/include/linux/vmalloc.h index 5317831..5317831 100644 --- a/sys/ofed/include/linux/vmalloc.h +++ b/sys/compat/linuxkpi/common/include/linux/vmalloc.h diff --git a/sys/ofed/include/linux/wait.h b/sys/compat/linuxkpi/common/include/linux/wait.h index c62f735..c62f735 100644 --- a/sys/ofed/include/linux/wait.h +++ b/sys/compat/linuxkpi/common/include/linux/wait.h diff --git a/sys/ofed/include/linux/workqueue.h b/sys/compat/linuxkpi/common/include/linux/workqueue.h index e9a6f5a..e9a6f5a 100644 --- a/sys/ofed/include/linux/workqueue.h +++ b/sys/compat/linuxkpi/common/include/linux/workqueue.h diff --git a/sys/ofed/include/net/if_inet6.h b/sys/compat/linuxkpi/common/include/net/if_inet6.h index df853fd..df853fd 100644 --- a/sys/ofed/include/net/if_inet6.h +++ b/sys/compat/linuxkpi/common/include/net/if_inet6.h diff --git a/sys/ofed/include/net/ip.h b/sys/compat/linuxkpi/common/include/net/ip.h index 7fbe9d9..7fbe9d9 100644 --- a/sys/ofed/include/net/ip.h +++ b/sys/compat/linuxkpi/common/include/net/ip.h diff --git a/sys/ofed/include/net/ipv6.h b/sys/compat/linuxkpi/common/include/net/ipv6.h index 1244706..1244706 100644 --- a/sys/ofed/include/net/ipv6.h +++ b/sys/compat/linuxkpi/common/include/net/ipv6.h diff --git a/sys/ofed/include/net/netevent.h b/sys/compat/linuxkpi/common/include/net/netevent.h index d2d37c0..d2d37c0 100644 --- a/sys/ofed/include/net/netevent.h +++ b/sys/compat/linuxkpi/common/include/net/netevent.h diff --git a/sys/ofed/include/net/tcp.h b/sys/compat/linuxkpi/common/include/net/tcp.h index 3f15619..3f15619 100644 --- a/sys/ofed/include/net/tcp.h +++ b/sys/compat/linuxkpi/common/include/net/tcp.h diff --git a/sys/ofed/include/linux/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 26df7db..26df7db 100644 --- a/sys/ofed/include/linux/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c diff --git a/sys/ofed/include/linux/linux_idr.c b/sys/compat/linuxkpi/common/src/linux_idr.c index fa98622..fa98622 100644 --- a/sys/ofed/include/linux/linux_idr.c +++ b/sys/compat/linuxkpi/common/src/linux_idr.c diff --git a/sys/ofed/include/linux/linux_kmod.c b/sys/compat/linuxkpi/common/src/linux_kmod.c index efe16fb..efe16fb 100644 --- a/sys/ofed/include/linux/linux_kmod.c +++ b/sys/compat/linuxkpi/common/src/linux_kmod.c diff --git a/sys/ofed/include/linux/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 2d3d03b..2d3d03b 100644 --- a/sys/ofed/include/linux/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c diff --git a/sys/ofed/include/linux/linux_radix.c b/sys/compat/linuxkpi/common/src/linux_radix.c index 1cd9e45..1cd9e45 100644 --- a/sys/ofed/include/linux/linux_radix.c +++ b/sys/compat/linuxkpi/common/src/linux_radix.c diff --git a/sys/dev/usb/usb_compat_linux.c b/sys/compat/linuxkpi/common/src/linux_usb.c index 56caf06..b7ef538 100644 --- a/sys/dev/usb/usb_compat_linux.c +++ b/sys/compat/linuxkpi/common/src/linux_usb.c @@ -54,7 +54,7 @@ #define USB_DEBUG_VAR usb_debug #include <dev/usb/usb_core.h> -#include <dev/usb/usb_compat_linux.h> +#include <linux/usb.h> #include <dev/usb/usb_process.h> #include <dev/usb/usb_device.h> #include <dev/usb/usb_util.h> @@ -63,6 +63,7 @@ #include <dev/usb/usb_hub.h> #include <dev/usb/usb_request.h> #include <dev/usb/usb_debug.h> +#include <dev/usb/usb_dynamic.h> #endif /* USB_GLOBAL_INCLUDE_FILE */ struct usb_linux_softc { @@ -1733,3 +1734,13 @@ usb_bulk_msg(struct usb_device *udev, struct usb_host_endpoint *uhe, return (err); } +MODULE_DEPEND(linuxkpi, usb, 1, 1, 1); + +static void +usb_linux_init(void *arg) +{ + /* register our function */ + usb_linux_free_device_p = &usb_linux_free_device; +} +SYSINIT(usb_linux_init, SI_SUB_LOCK, SI_ORDER_FIRST, usb_linux_init, NULL); +SYSUNINIT(usb_linux_unload, SI_SUB_LOCK, SI_ORDER_ANY, usb_linux_unload, NULL); diff --git a/sys/conf/NOTES b/sys/conf/NOTES index c1210e2..1afefdb 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -359,6 +359,9 @@ options COMPAT_FREEBSD9 # Enable FreeBSD10 compatibility syscalls options COMPAT_FREEBSD10 +# Enable Linux Kernel Programming Interface +options COMPAT_LINUXKPI + # # These three options provide support for System V Interface # Definition-style interprocess communication, in the form of shared diff --git a/sys/conf/files b/sys/conf/files index 9a6dec4..c07cf40 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2574,7 +2574,6 @@ dev/usb/storage/ustorage_fs.c optional usfs # USB core # dev/usb/usb_busdma.c optional usb -dev/usb/usb_compat_linux.c optional usb dev/usb/usb_core.c optional usb dev/usb/usb_debug.c optional usb dev/usb/usb_dev.c optional usb @@ -3796,17 +3795,20 @@ nlm/nlm_prot_svc.c optional nfslockd | nfsd nlm/nlm_prot_xdr.c optional nfslockd | nfsd nlm/sm_inter_xdr.c optional nfslockd | nfsd -# Linux Kernel Compatibility API -ofed/include/linux/linux_kmod.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_compat.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_pci.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_idr.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" -ofed/include/linux/linux_radix.c optional ofed | compat_linuxkpi \ - no-depend compile-with "${OFED_C}" +# Linux Kernel Programming Interface +compat/linuxkpi/common/src/linux_kmod.c optional compat_linuxkpi \ + no-depend compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_compat.c optional compat_linuxkpi \ + no-depend compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_pci.c optional compat_linuxkpi pci \ + no-depend compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_idr.c optional compat_linuxkpi \ + no-depend compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_radix.c optional compat_linuxkpi \ + no-depend compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linux_usb.c optional compat_linuxkpi usb \ + no-depend compile-with "${LINUXKPI_C}" + # OpenFabrics Enterprise Distribution (Infiniband) ofed/drivers/infiniband/core/addr.c optional ofed \ no-depend \ diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 3783881..4328749 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -177,9 +177,13 @@ NORMAL_CTFCONVERT= @: NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC} +# Linux Kernel Programming Interface C-flags +LINUXKPI_INCLUDES= -I$S/compat/linuxkpi/common/include +LINUXKPI_C= ${NORMAL_C} ${LINUXKPI_INCLUDES} + # Infiniband C flags. Correct include paths and omit errors that linux # does not honor. -OFEDINCLUDES= -I$S/ofed/include/ +OFEDINCLUDES= -I$S/ofed/include ${LINUXKPI_INCLUDES} OFEDNOERR= -Wno-cast-qual -Wno-pointer-arith OFEDCFLAGS= ${CFLAGS:N-I*} ${OFEDINCLUDES} ${CFLAGS:M-I*} ${OFEDNOERR} OFED_C_NOIMP= ${CC} -c -o ${.TARGET} ${OFEDCFLAGS} ${WERROR} ${PROF} diff --git a/sys/dev/usb/usb_device.c b/sys/dev/usb/usb_device.c index 13e2c14..8940171 100644 --- a/sys/dev/usb/usb_device.c +++ b/sys/dev/usb/usb_device.c @@ -506,8 +506,8 @@ usb_unconfigure(struct usb_device *udev, uint8_t flag) #if USB_HAVE_COMPAT_LINUX /* free Linux compat device, if any */ - if (udev->linux_endpoint_start) { - usb_linux_free_device(udev); + if (udev->linux_endpoint_start != NULL) { + usb_linux_free_device_p(udev); udev->linux_endpoint_start = NULL; } #endif diff --git a/sys/dev/usb/usb_dynamic.c b/sys/dev/usb/usb_dynamic.c index d08e7f8..24c13f9 100644 --- a/sys/dev/usb/usb_dynamic.c +++ b/sys/dev/usb/usb_dynamic.c @@ -59,6 +59,9 @@ /* function prototypes */ static usb_handle_req_t usb_temp_get_desc_w; static usb_temp_setup_by_index_t usb_temp_setup_by_index_w; +#if USB_HAVE_COMPAT_LINUX +static usb_linux_free_device_t usb_linux_free_device_w; +#endif static usb_temp_unsetup_t usb_temp_unsetup_w; static usb_test_quirk_t usb_test_quirk_w; static usb_quirk_ioctl_t usb_quirk_ioctl_w; @@ -66,6 +69,9 @@ static usb_quirk_ioctl_t usb_quirk_ioctl_w; /* global variables */ usb_handle_req_t *usb_temp_get_desc_p = &usb_temp_get_desc_w; usb_temp_setup_by_index_t *usb_temp_setup_by_index_p = &usb_temp_setup_by_index_w; +#if USB_HAVE_COMPAT_LINUX +usb_linux_free_device_t *usb_linux_free_device_p = &usb_linux_free_device_w; +#endif usb_temp_unsetup_t *usb_temp_unsetup_p = &usb_temp_unsetup_w; usb_test_quirk_t *usb_test_quirk_p = &usb_test_quirk_w; usb_quirk_ioctl_t *usb_quirk_ioctl_p = &usb_quirk_ioctl_w; @@ -103,6 +109,14 @@ usb_temp_unsetup_w(struct usb_device *udev) udev->usb_template_ptr = NULL; } +#if USB_HAVE_COMPAT_LINUX +static void +usb_linux_free_device_w(struct usb_device *udev) +{ + /* NOP */ +} +#endif + void usb_quirk_unload(void *arg) { @@ -147,3 +161,19 @@ usb_bus_unload(void *arg) pause("WAIT", hz); } + +#if USB_HAVE_COMPAT_LINUX +void +usb_linux_unload(void *arg) +{ + /* reset function pointers */ + + usb_linux_free_device_p = &usb_linux_free_device_w; + + /* wait for CPU to exit the loaded functions, if any */ + + /* XXX this is a tradeoff */ + + pause("WAIT", hz); +} +#endif diff --git a/sys/dev/usb/usb_dynamic.h b/sys/dev/usb/usb_dynamic.h index 5684942..e52c46f 100644 --- a/sys/dev/usb/usb_dynamic.h +++ b/sys/dev/usb/usb_dynamic.h @@ -42,11 +42,13 @@ typedef uint8_t (usb_test_quirk_t)(const struct usbd_lookup_info *info, typedef int (usb_quirk_ioctl_t)(unsigned long cmd, caddr_t data, int fflag, struct thread *td); typedef void (usb_temp_unsetup_t)(struct usb_device *udev); +typedef void (usb_linux_free_device_t)(struct usb_device *udev); /* global function pointers */ extern usb_handle_req_t *usb_temp_get_desc_p; extern usb_temp_setup_by_index_t *usb_temp_setup_by_index_p; +extern usb_linux_free_device_t *usb_linux_free_device_p; extern usb_temp_unsetup_t *usb_temp_unsetup_p; extern usb_test_quirk_t *usb_test_quirk_p; extern usb_quirk_ioctl_t *usb_quirk_ioctl_p; @@ -54,6 +56,7 @@ extern devclass_t usb_devclass_ptr; /* function prototypes */ +void usb_linux_unload(void *); void usb_temp_unload(void *); void usb_quirk_unload(void *); void usb_bus_unload(void *); diff --git a/sys/modules/cxgb/iw_cxgb/Makefile b/sys/modules/cxgb/iw_cxgb/Makefile index 8df1ffc..57a7c60 100644 --- a/sys/modules/cxgb/iw_cxgb/Makefile +++ b/sys/modules/cxgb/iw_cxgb/Makefile @@ -10,5 +10,6 @@ SRCS+= iw_cxgb_ev.c iw_cxgb_mem.c iw_cxgb_dbg.c iw_cxgb_cq.c SRCS+= bus_if.h device_if.h opt_sched.h pci_if.h pcib_if.h opt_ktr.h SRCS+= opt_inet.h opt_ofed.h vnode_if.h CFLAGS+= -I${CXGB} -I${.CURDIR}/../../../ofed/include -DLINUX_TYPES_DEFINED +CFLAGS+= -I${.CURDIR}/../../../compat/linuxkpi/common/include .include <bsd.kmod.mk> diff --git a/sys/modules/cxgbe/iw_cxgbe/Makefile b/sys/modules/cxgbe/iw_cxgbe/Makefile index e1f362a..d4c041f 100644 --- a/sys/modules/cxgbe/iw_cxgbe/Makefile +++ b/sys/modules/cxgbe/iw_cxgbe/Makefile @@ -24,5 +24,6 @@ SRCS+= resource.c SRCS+= vnode_if.h CFLAGS+= -I${CXGBE} -I${.CURDIR}/../../../ofed/include -DLINUX_TYPES_DEFINED +CFLAGS+= -I${.CURDIR}/../../../compat/linuxkpi/common/include .include <bsd.kmod.mk> diff --git a/sys/modules/ibcore/Makefile b/sys/modules/ibcore/Makefile index 60ec8dd..490a11a 100644 --- a/sys/modules/ibcore/Makefile +++ b/sys/modules/ibcore/Makefile @@ -1,6 +1,5 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/core -.PATH: ${.CURDIR}/../../ofed/include/linux KMOD= ibcore SRCS= addr.c iwcm.c sa_query.c ucma.c uverbs_cmd.c \ @@ -12,8 +11,8 @@ SRCS= addr.c iwcm.c sa_query.c ucma.c uverbs_cmd.c \ opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/core -CFLAGS+= -I${.CURDIR}/../mlx4ib -CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -I${.CURDIR}/../../ofed/include +CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include CFLAGS+= -DINET6 -DINET .include <bsd.kmod.mk> diff --git a/sys/modules/ipoib/Makefile b/sys/modules/ipoib/Makefile index ba8c6d3..908187c 100644 --- a/sys/modules/ipoib/Makefile +++ b/sys/modules/ipoib/Makefile @@ -1,6 +1,5 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib -.PATH: ${.CURDIR}/../../ofed/include/linux KMOD= ipoib SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ @@ -9,8 +8,8 @@ SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ ipoib_multicast.c ipoib_verbs.c CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/ulp/ipoib -CFLAGS+= -I${.CURDIR}/../ibcore -CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -I${.CURDIR}/../../ofed/include +CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include CFLAGS+= -DINET6 -DINET .include <bsd.kmod.mk> diff --git a/sys/modules/linuxkpi/Makefile b/sys/modules/linuxkpi/Makefile index 47aa6cd..bcfb03a 100644 --- a/sys/modules/linuxkpi/Makefile +++ b/sys/modules/linuxkpi/Makefile @@ -1,18 +1,21 @@ # $FreeBSD$ -.PATH: ${.CURDIR}/../../ofed/include/linux +.PATH: ${.CURDIR}/../../compat/linuxkpi/common/src KMOD= linuxkpi SRCS= linux_kmod.c \ linux_compat.c \ linux_pci.c \ linux_radix.c \ - linux_idr.c + linux_idr.c \ + linux_usb.c SRCS+= bus_if.h \ device_if.h \ pci_if.h \ - vnode_if.h + vnode_if.h \ + usb_if.h \ + opt_usb.h -CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include .include <bsd.kmod.mk> diff --git a/sys/modules/mlx4/Makefile b/sys/modules/mlx4/Makefile index cd2b177..0aed17d 100644 --- a/sys/modules/mlx4/Makefile +++ b/sys/modules/mlx4/Makefile @@ -1,6 +1,5 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/net/mlx4 -.PATH: ${.CURDIR}/../../ofed/include/linux KMOD= mlx4 SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ @@ -11,7 +10,8 @@ SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ srq.c resource_tracker.c sys_tune.c CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 -CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -I${.CURDIR}/../../ofed/include +CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include .include <bsd.kmod.mk> diff --git a/sys/modules/mlx4ib/Makefile b/sys/modules/mlx4ib/Makefile index 7bfcb4a..4885bf7 100644 --- a/sys/modules/mlx4ib/Makefile +++ b/sys/modules/mlx4ib/Makefile @@ -1,6 +1,5 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 -.PATH: ${.CURDIR}/../../ofed/include/linux KMOD= mlx4ib SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ @@ -10,7 +9,8 @@ SRCS= device_if.h bus_if.h vnode_if.h pci_if.h \ doorbell.c mad.c main.c mr.c qp.c srq.c wc.c cm.c CFLAGS+= -I${.CURDIR}/../../ofed/drivers/infiniband/hw/mlx4 -CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -I${.CURDIR}/../../ofed/include +CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM CFLAGS+= -DINET6 -DINET diff --git a/sys/modules/mlxen/Makefile b/sys/modules/mlxen/Makefile index 02cca40..11925d4 100644 --- a/sys/modules/mlxen/Makefile +++ b/sys/modules/mlxen/Makefile @@ -7,7 +7,8 @@ SRCS += en_cq.c en_main.c en_netdev.c en_port.c en_resources.c SRCS += en_rx.c en_tx.c SRCS += opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/drivers/net/mlx4 -CFLAGS+= -I${.CURDIR}/../../ofed/include/ +CFLAGS+= -I${.CURDIR}/../../ofed/include +CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include .include <bsd.kmod.mk> diff --git a/sys/modules/mthca/Makefile b/sys/modules/mthca/Makefile index 31fcebd..95157e2 100644 --- a/sys/modules/mthca/Makefile +++ b/sys/modules/mthca/Makefile @@ -1,5 +1,4 @@ # $FreeBSD$ - .PATH: ${.CURDIR}/../../ofed/drivers/infiniband/hw/mthca KMOD = mthca @@ -11,6 +10,7 @@ SRCS+= mthca_reset.c mthca_srq.c mthca_uar.c SRCS+= opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../ofed/include +CFLAGS+= -I${.CURDIR}/../../compat/linuxkpi/common/include .include <bsd.kmod.mk> diff --git a/sys/modules/rdma/krping/Makefile b/sys/modules/rdma/krping/Makefile index 1bbc0e4..ecc24a5 100644 --- a/sys/modules/rdma/krping/Makefile +++ b/sys/modules/rdma/krping/Makefile @@ -1,12 +1,11 @@ # $FreeBSD$ - -RDMA= ${.CURDIR}/../../../contrib/rdma/krping -.PATH: ${RDMA} +.PATH: ${.CURDIR}/../../../contrib/rdma/krping KMOD= krping SRCS= krping.c krping_dev.c getopt.c SRCS+= bus_if.h device_if.h pci_if.h pcib_if.h vnode_if.h SRCS+= opt_sched.h opt_inet.h opt_inet6.h CFLAGS+= -I${.CURDIR}/../../../ofed/include +CFLAGS+= -I${.CURDIR}/../../../compat/linuxkpi/common/include .include <bsd.kmod.mk> diff --git a/sys/modules/usb/usb/Makefile b/sys/modules/usb/usb/Makefile index 5bae119..704895e 100644 --- a/sys/modules/usb/usb/Makefile +++ b/sys/modules/usb/usb/Makefile @@ -33,7 +33,7 @@ KMOD= usb SRCS= bus_if.h device_if.h usb_if.h usb_if.c vnode_if.h \ opt_usb.h opt_bus.h opt_ddb.h \ usb_pf.h usbdevs.h usbdevs_data.h \ - usb_busdma.c usb_controller.c usb_compat_linux.c usb_core.c usb_debug.c \ + usb_busdma.c usb_controller.c usb_core.c usb_debug.c \ usb_dev.c usb_device.c usb_dynamic.c usb_error.c usb_generic.c \ usb_handle_request.c usb_hid.c usb_hub.c usb_lookup.c usb_mbuf.c \ usb_msctest.c usb_parse.c usb_pf.c usb_process.c usb_request.c \ diff --git a/sys/sys/param.h b/sys/sys/param.h index 9df3c9c..aa8606e 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100083 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100084 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, |