aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2015-10-29 08:28:39 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2015-10-29 08:28:39 +0000
commit8d59ecb214f7e078e57d35b865f33efc5d7cdf4d (patch)
treef9937a81e1e19355726bac644f9598a290f8a9cb /sys
parente3cf3d4428b00b739738a19fbaa485f897159081 (diff)
downloadsrc-8d59ecb214f7e078e57d35b865f33efc5d7cdf4d.tar.gz
src-8d59ecb214f7e078e57d35b865f33efc5d7cdf4d.zip
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
Notes
Notes: svn path=/head/; revision=290135
Diffstat (limited to 'sys')
-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/NOTES3
-rw-r--r--sys/conf/files26
-rw-r--r--sys/conf/kern.pre.mk6
-rw-r--r--sys/dev/usb/usb_device.c4
-rw-r--r--sys/dev/usb/usb_dynamic.c30
-rw-r--r--sys/dev/usb/usb_dynamic.h3
-rw-r--r--sys/modules/cxgb/iw_cxgb/Makefile1
-rw-r--r--sys/modules/cxgbe/iw_cxgbe/Makefile1
-rw-r--r--sys/modules/ibcore/Makefile5
-rw-r--r--sys/modules/ipoib/Makefile5
-rw-r--r--sys/modules/linuxkpi/Makefile11
-rw-r--r--sys/modules/mlx4/Makefile4
-rw-r--r--sys/modules/mlx4ib/Makefile4
-rw-r--r--sys/modules/mlxen/Makefile3
-rw-r--r--sys/modules/mthca/Makefile2
-rw-r--r--sys/modules/rdma/krping/Makefile5
-rw-r--r--sys/modules/usb/usb/Makefile2
-rw-r--r--sys/sys/param.h2
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 f522af86997d..f522af86997d 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 fc22a39f2e62..fc22a39f2e62 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 7168e49b951a..7168e49b951a 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 f24624e6eeed..f24624e6eeed 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 24d350f4743e..24d350f4743e 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 7bdab1cafdb5..7bdab1cafdb5 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 fb2fd568c067..fb2fd568c067 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 ce90355220f4..ce90355220f4 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 8b985a92c475..8b985a92c475 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 a269e55eb90b..a269e55eb90b 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 9d5b3fb0f240..9d5b3fb0f240 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 7a4835c9bea3..7a4835c9bea3 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 74ce9ec79b61..74ce9ec79b61 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 638135845b73..638135845b73 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 7cfb10db86be..7cfb10db86be 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 da38662087e4..da38662087e4 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 3459a5c4b68d..3459a5c4b68d 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 fda22822dc48..fda22822dc48 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 da08751d31de..da08751d31de 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 3ea2d5b0a491..3ea2d5b0a491 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 236613096340..236613096340 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 a043a3db6ec3..a043a3db6ec3 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 12ea345d2f8f..12ea345d2f8f 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 b23c9714b92a..b23c9714b92a 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 797b81694ad4..797b81694ad4 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 a82f30d15ac6..a82f30d15ac6 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 b8e4c95360f8..b8e4c95360f8 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 9beec6898838..9beec6898838 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 6233aac6fa67..6233aac6fa67 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 c89e1e2740d4..c89e1e2740d4 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 4a8808fb335c..4a8808fb335c 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 f390c1d6b375..f390c1d6b375 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 ef012dd023dd..ef012dd023dd 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 12d7544ceae6..12d7544ceae6 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 4c0ad8087582..4c0ad8087582 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 8650dba65e6b..8650dba65e6b 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 16543ff11573..16543ff11573 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 6f57906e07a7..6f57906e07a7 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 f31829e846b2..f31829e846b2 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 f7bc52916340..f7bc52916340 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 8dea1abaadfd..8dea1abaadfd 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 bfc3b7d7b6b0..bfc3b7d7b6b0 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 c943dc598d5c..c943dc598d5c 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 63fbc56b48bc..63fbc56b48bc 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 de5ddaa4b886..de5ddaa4b886 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 fa8e9bafea90..fa8e9bafea90 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 c9fa81c65e05..c9fa81c65e05 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 bfa7d975a2ff..bfa7d975a2ff 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 27386935bbe6..27386935bbe6 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 a44c560f043b..a44c560f043b 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 2a488f1216f4..2a488f1216f4 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 96d8fe7f2dad..96d8fe7f2dad 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 3835e34153d0..3835e34153d0 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 0caa2b00695b..0caa2b00695b 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 9699b334ee51..9699b334ee51 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 aee34cf9dbe9..aee34cf9dbe9 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 166b7503f273..166b7503f273 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 1b1f8bfe262a..1b1f8bfe262a 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 ca750e04a37d..ca750e04a37d 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 acc9f036c692..acc9f036c692 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 54ea99c5e8e4..54ea99c5e8e4 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 e4f7417caef9..e4f7417caef9 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 b16059402692..b16059402692 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 838b81cfdf73..838b81cfdf73 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 caae7b312e15..caae7b312e15 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 c4478ca50daa..c4478ca50daa 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 e7c6301f9587..e7c6301f9587 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 22ad4dc62a94..22ad4dc62a94 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 5aa8d654b504..5aa8d654b504 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 c2d66d7fa6dd..c2d66d7fa6dd 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 022a0164840f..022a0164840f 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 1b56b555f44e..1b56b555f44e 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 a9a952e4ffd8..a9a952e4ffd8 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 97c83e0ed034..97c83e0ed034 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 cf55b098a3fc..cf55b098a3fc 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 e565e43699d6..e565e43699d6 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 27516a4c917e..27516a4c917e 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 a794c13873a6..a794c13873a6 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 c9c37284a706..c9c37284a706 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 87d1babddce2..87d1babddce2 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 1f00d4b4addc..1f00d4b4addc 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 53178314c35a..53178314c35a 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 c62f73519e43..c62f73519e43 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 e9a6f5aae869..e9a6f5aae869 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 df853fd36cce..df853fd36cce 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 7fbe9d99e2a9..7fbe9d99e2a9 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 1244706e14c4..1244706e14c4 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 d2d37c0a1ed5..d2d37c0a1ed5 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 3f156196aaaf..3f156196aaaf 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 26df7db6ce93..26df7db6ce93 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 fa9862275a88..fa9862275a88 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 efe16fbb1aa9..efe16fbb1aa9 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 2d3d03b7de40..2d3d03b7de40 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 1cd9e45e5b72..1cd9e45e5b72 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 56caf0678a68..b7ef53889179 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 c1210e240191..1afefdba081a 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 9a6dec43a8b4..c07cf408a6d5 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 3783881d322e..4328749447a5 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 13e2c145400b..8940171459a0 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 d08e7f84afd8..24c13f9f5dc1 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 568494204c17..e52c46fb75b8 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 8df1ffc28005..57a7c6030732 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 e1f362aa0b97..d4c041f00910 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 60ec8dd3cace..490a11a879b3 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 ba8c6d35a6ac..908187c96f39 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 47aa6cdd13d1..bcfb03a6ae3e 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 cd2b177f13b4..0aed17d61555 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 7bfcb4a61a5a..4885bf712ec4 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 02cca400f741..11925d4a7fb1 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 31fcebd1828e..95157e28058f 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 1bbc0e4a7b3c..ecc24a5f014f 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 5bae119aaae6..704895ec8ec3 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 9df3c9ce3a63..aa8606e4983a 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,