Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2014 20:12:36 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r271127 - in stable/10/sys: contrib/rdma/krping dev/cxgb dev/cxgbe/iw_cxgbe modules/mlx4 modules/mlx4ib modules/mlxen ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/d...
Message-ID:  <201409042012.s84KCacX027491@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Thu Sep  4 20:12:36 2014
New Revision: 271127
URL: http://svnweb.freebsd.org/changeset/base/271127

Log:
  MFC r270710 and r270821:
  - Update the OFED Linux Emulation layer as a preparation for a
  hardware driver update from Mellanox Technologies.
  - Remove empty files from the OFED Linux Emulation layer.
  - Fix compile warnings related to printf() and the "%lld" and "%llx"
  format specifiers.
  - Add some missing 2-clause BSD copyrights.
  - Add "Mellanox Technologies, Ltd." to list of copyright holders.
  - Add some new compatibility files.
  - Fix order of uninit in the mlx4ib module to avoid crash at unload
  using the new module_exit_order() function.
  
  Sponsored by:	Mellanox Technologies

Added:
  stable/10/sys/ofed/include/linux/cache.h
     - copied unchanged from r270710, head/sys/ofed/include/linux/cache.h
  stable/10/sys/ofed/include/linux/etherdevice.h
     - copied unchanged from r270710, head/sys/ofed/include/linux/etherdevice.h
  stable/10/sys/ofed/include/linux/kmod.h
     - copied unchanged from r270710, head/sys/ofed/include/linux/kmod.h
  stable/10/sys/ofed/include/linux/ktime.h
     - copied unchanged from r270710, head/sys/ofed/include/linux/ktime.h
  stable/10/sys/ofed/include/linux/math64.h
     - copied unchanged from r270710, head/sys/ofed/include/linux/math64.h
  stable/10/sys/ofed/include/net/if_inet6.h
     - copied unchanged from r270710, head/sys/ofed/include/net/if_inet6.h
Deleted:
  stable/10/sys/ofed/include/asm/current.h
  stable/10/sys/ofed/include/asm/semaphore.h
  stable/10/sys/ofed/include/asm/system.h
  stable/10/sys/ofed/include/linux/atomic.h
  stable/10/sys/ofed/include/linux/bitmap.h
  stable/10/sys/ofed/include/linux/ctype.h
  stable/10/sys/ofed/include/linux/init.h
  stable/10/sys/ofed/include/linux/rtnetlink.h
  stable/10/sys/ofed/include/linux/stddef.h
  stable/10/sys/ofed/include/net/addrconf.h
  stable/10/sys/ofed/include/net/arp.h
  stable/10/sys/ofed/include/net/ip6_route.h
  stable/10/sys/ofed/include/net/neighbour.h
Modified:
  stable/10/sys/contrib/rdma/krping/krping.c
  stable/10/sys/dev/cxgb/cxgb_osdep.h
  stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c
  stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c
  stable/10/sys/modules/mlx4/Makefile
  stable/10/sys/modules/mlx4ib/Makefile
  stable/10/sys/modules/mlxen/Makefile
  stable/10/sys/ofed/drivers/infiniband/core/addr.c
  stable/10/sys/ofed/drivers/infiniband/core/cm.c
  stable/10/sys/ofed/drivers/infiniband/core/device.c
  stable/10/sys/ofed/drivers/infiniband/core/iwcm.c
  stable/10/sys/ofed/drivers/infiniband/core/sa_query.c
  stable/10/sys/ofed/drivers/infiniband/core/sysfs.c
  stable/10/sys/ofed/drivers/infiniband/core/ucm.c
  stable/10/sys/ofed/drivers/infiniband/core/user_mad.c
  stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
  stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c
  stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c
  stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c
  stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
  stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
  stable/10/sys/ofed/drivers/net/mlx4/alloc.c
  stable/10/sys/ofed/drivers/net/mlx4/cmd.c
  stable/10/sys/ofed/drivers/net/mlx4/cq.c
  stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c
  stable/10/sys/ofed/drivers/net/mlx4/en_rx.c
  stable/10/sys/ofed/drivers/net/mlx4/eq.c
  stable/10/sys/ofed/drivers/net/mlx4/fw.c
  stable/10/sys/ofed/drivers/net/mlx4/main.c
  stable/10/sys/ofed/drivers/net/mlx4/mcg.c
  stable/10/sys/ofed/drivers/net/mlx4/mr.c
  stable/10/sys/ofed/drivers/net/mlx4/pd.c
  stable/10/sys/ofed/drivers/net/mlx4/qp.c
  stable/10/sys/ofed/drivers/net/mlx4/reset.c
  stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c
  stable/10/sys/ofed/drivers/net/mlx4/sense.c
  stable/10/sys/ofed/drivers/net/mlx4/srq.c
  stable/10/sys/ofed/drivers/net/mlx4/xrcd.c
  stable/10/sys/ofed/include/asm/atomic-long.h
  stable/10/sys/ofed/include/asm/atomic.h
  stable/10/sys/ofed/include/asm/byteorder.h
  stable/10/sys/ofed/include/asm/fcntl.h
  stable/10/sys/ofed/include/asm/io.h
  stable/10/sys/ofed/include/asm/page.h
  stable/10/sys/ofed/include/asm/pgtable.h
  stable/10/sys/ofed/include/asm/types.h
  stable/10/sys/ofed/include/asm/uaccess.h
  stable/10/sys/ofed/include/linux/bitops.h
  stable/10/sys/ofed/include/linux/cdev.h
  stable/10/sys/ofed/include/linux/clocksource.h
  stable/10/sys/ofed/include/linux/compat.h
  stable/10/sys/ofed/include/linux/compiler.h
  stable/10/sys/ofed/include/linux/completion.h
  stable/10/sys/ofed/include/linux/delay.h
  stable/10/sys/ofed/include/linux/device.h
  stable/10/sys/ofed/include/linux/dma-attrs.h
  stable/10/sys/ofed/include/linux/dma-mapping.h
  stable/10/sys/ofed/include/linux/dmapool.h
  stable/10/sys/ofed/include/linux/err.h
  stable/10/sys/ofed/include/linux/errno.h
  stable/10/sys/ofed/include/linux/ethtool.h
  stable/10/sys/ofed/include/linux/file.h
  stable/10/sys/ofed/include/linux/fs.h
  stable/10/sys/ofed/include/linux/gfp.h
  stable/10/sys/ofed/include/linux/hardirq.h
  stable/10/sys/ofed/include/linux/idr.h
  stable/10/sys/ofed/include/linux/if_arp.h
  stable/10/sys/ofed/include/linux/if_ether.h
  stable/10/sys/ofed/include/linux/if_vlan.h
  stable/10/sys/ofed/include/linux/in.h
  stable/10/sys/ofed/include/linux/in6.h
  stable/10/sys/ofed/include/linux/inet.h
  stable/10/sys/ofed/include/linux/inetdevice.h
  stable/10/sys/ofed/include/linux/interrupt.h
  stable/10/sys/ofed/include/linux/io-mapping.h
  stable/10/sys/ofed/include/linux/io.h
  stable/10/sys/ofed/include/linux/ioctl.h
  stable/10/sys/ofed/include/linux/jiffies.h
  stable/10/sys/ofed/include/linux/kdev_t.h
  stable/10/sys/ofed/include/linux/kernel.h
  stable/10/sys/ofed/include/linux/kobject.h
  stable/10/sys/ofed/include/linux/kref.h
  stable/10/sys/ofed/include/linux/kthread.h
  stable/10/sys/ofed/include/linux/linux_compat.c
  stable/10/sys/ofed/include/linux/linux_idr.c
  stable/10/sys/ofed/include/linux/linux_radix.c
  stable/10/sys/ofed/include/linux/list.h
  stable/10/sys/ofed/include/linux/lockdep.h
  stable/10/sys/ofed/include/linux/log2.h
  stable/10/sys/ofed/include/linux/miscdevice.h
  stable/10/sys/ofed/include/linux/mm.h
  stable/10/sys/ofed/include/linux/module.h
  stable/10/sys/ofed/include/linux/moduleparam.h
  stable/10/sys/ofed/include/linux/mount.h
  stable/10/sys/ofed/include/linux/mutex.h
  stable/10/sys/ofed/include/linux/net.h
  stable/10/sys/ofed/include/linux/netdevice.h
  stable/10/sys/ofed/include/linux/notifier.h
  stable/10/sys/ofed/include/linux/page.h
  stable/10/sys/ofed/include/linux/pci.h
  stable/10/sys/ofed/include/linux/poll.h
  stable/10/sys/ofed/include/linux/radix-tree.h
  stable/10/sys/ofed/include/linux/random.h
  stable/10/sys/ofed/include/linux/rbtree.h
  stable/10/sys/ofed/include/linux/rwlock.h
  stable/10/sys/ofed/include/linux/rwsem.h
  stable/10/sys/ofed/include/linux/scatterlist.h
  stable/10/sys/ofed/include/linux/sched.h
  stable/10/sys/ofed/include/linux/semaphore.h
  stable/10/sys/ofed/include/linux/slab.h
  stable/10/sys/ofed/include/linux/socket.h
  stable/10/sys/ofed/include/linux/spinlock.h
  stable/10/sys/ofed/include/linux/string.h
  stable/10/sys/ofed/include/linux/sysfs.h
  stable/10/sys/ofed/include/linux/timer.h
  stable/10/sys/ofed/include/linux/types.h
  stable/10/sys/ofed/include/linux/uaccess.h
  stable/10/sys/ofed/include/linux/vmalloc.h
  stable/10/sys/ofed/include/linux/wait.h
  stable/10/sys/ofed/include/linux/workqueue.h
  stable/10/sys/ofed/include/net/ip.h
  stable/10/sys/ofed/include/net/ipv6.h
  stable/10/sys/ofed/include/net/netevent.h
  stable/10/sys/ofed/include/net/tcp.h
  stable/10/sys/ofed/include/rdma/ib_umem.h
  stable/10/sys/ofed/include/rdma/ib_verbs.h
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/contrib/rdma/krping/krping.c
==============================================================================
--- stable/10/sys/contrib/rdma/krping/krping.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/contrib/rdma/krping/krping.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$");
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/err.h>
 #include <linux/string.h>
@@ -46,7 +45,6 @@ __FBSDID("$FreeBSD$");
 #include <linux/device.h>
 #include <linux/pci.h>
 #include <linux/sched.h>
-#include <asm/system.h>
 
 #include <asm/atomic.h>
 

Modified: stable/10/sys/dev/cxgb/cxgb_osdep.h
==============================================================================
--- stable/10/sys/dev/cxgb/cxgb_osdep.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/dev/cxgb/cxgb_osdep.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -91,8 +91,6 @@ struct t3_mbuf_hdr {
 #endif
 #endif
 
-#define __read_mostly __attribute__((__section__(".data.read_mostly")))
-
 /*
  * Workaround for weird Chelsio issue
  */

Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c
==============================================================================
--- stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/dev/cxgbe/iw_cxgbe/cm.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sockio.h>
 #include <sys/taskqueue.h>
 #include <netinet/in.h>
-#include <net/neighbour.h>
 #include <net/route.h>
 
 #include <netinet/in_systm.h>

Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c
==============================================================================
--- stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/dev/cxgbe/iw_cxgbe/qp.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
 #include <sys/sockio.h>
 #include <sys/taskqueue.h>
 #include <netinet/in.h>
-#include <net/neighbour.h>
 #include <net/route.h>
 
 #include <netinet/in_systm.h>

Modified: stable/10/sys/modules/mlx4/Makefile
==============================================================================
--- stable/10/sys/modules/mlx4/Makefile	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/modules/mlx4/Makefile	Thu Sep  4 20:12:36 2014	(r271127)
@@ -27,6 +27,7 @@ opt_inet6.h:
 .include <bsd.kmod.mk>
 
 CFLAGS+= -Wno-cast-qual -Wno-pointer-arith ${GCC_MS_EXTENSIONS}
+CFLAGS+= -fms-extensions
 
 CWARNFLAGS.mcg.c=	-Wno-unused
 CWARNFLAGS+=		${CWARNFLAGS.${.IMPSRC:T}}

Modified: stable/10/sys/modules/mlx4ib/Makefile
==============================================================================
--- stable/10/sys/modules/mlx4ib/Makefile	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/modules/mlx4ib/Makefile	Thu Sep  4 20:12:36 2014	(r271127)
@@ -16,6 +16,7 @@ CFLAGS+= -I${.CURDIR}/../../ofed/drivers
 CFLAGS+= -I${.CURDIR}/../../ofed/include/
 CFLAGS+= -DCONFIG_INFINIBAND_USER_MEM
 CFLAGS+= -DINET6 -DINET -DOFED
+CFLAGS+= -fms-extensions
 
 .if !defined(KERNBUILDDIR)
 .if ${MK_INET_SUPPORT} != "no"

Modified: stable/10/sys/modules/mlxen/Makefile
==============================================================================
--- stable/10/sys/modules/mlxen/Makefile	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/modules/mlxen/Makefile	Thu Sep  4 20:12:36 2014	(r271127)
@@ -10,6 +10,7 @@ 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+= -fms-extensions
 
 .if !defined(KERNBUILDDIR)
 .if ${MK_INET_SUPPORT} != "no"

Modified: stable/10/sys/ofed/drivers/infiniband/core/addr.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/addr.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/addr.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -36,12 +36,8 @@
 #include <linux/mutex.h>
 #include <linux/inetdevice.h>
 #include <linux/workqueue.h>
-#include <net/arp.h>
-#include <net/neighbour.h>
 #include <net/route.h>
 #include <net/netevent.h>
-#include <net/addrconf.h>
-#include <net/ip6_route.h>
 #include <rdma/ib_addr.h>
 
 MODULE_AUTHOR("Sean Hefty");

Modified: stable/10/sys/ofed/drivers/infiniband/core/cm.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/cm.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/cm.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -45,6 +45,9 @@
 #include <linux/sysfs.h>
 #include <linux/workqueue.h>
 #include <linux/kdev_t.h>
+#include <linux/string.h>
+
+#include <asm/atomic-long.h>
 
 #include <rdma/ib_cache.h>
 #include <rdma/ib_cm.h>
@@ -3890,5 +3893,5 @@ static void __exit ib_cm_cleanup(void)
 }
 
 module_init_order(ib_cm_init, SI_ORDER_SECOND);
-module_exit(ib_cm_cleanup);
+module_exit_order(ib_cm_cleanup, SI_ORDER_FIRST);
 

Modified: stable/10/sys/ofed/drivers/infiniband/core/device.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/device.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/device.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -36,7 +36,6 @@
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/slab.h>
-#include <linux/init.h>
 #include <linux/mutex.h>
 #include <linux/workqueue.h>
 

Modified: stable/10/sys/ofed/drivers/infiniband/core/iwcm.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/iwcm.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/iwcm.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -43,6 +43,7 @@
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
 #include <linux/completion.h>
+#include <linux/string.h>
 
 #include <rdma/iw_cm.h>
 #include <rdma/ib_addr.h>

Modified: stable/10/sys/ofed/drivers/infiniband/core/sa_query.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/sa_query.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/sa_query.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -33,7 +33,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/err.h>
 #include <linux/random.h>
 #include <linux/spinlock.h>

Modified: stable/10/sys/ofed/drivers/infiniband/core/sysfs.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/sysfs.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/sysfs.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -36,6 +36,7 @@
 
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/fs.h>
 
 #include <rdma/ib_mad.h>
 #include <rdma/ib_pma.h>

Modified: stable/10/sys/ofed/drivers/infiniband/core/ucm.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/ucm.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/ucm.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -32,7 +32,6 @@
  */
 
 #include <linux/completion.h>
-#include <linux/init.h>
 #include <linux/fs.h>
 #include <linux/module.h>
 #include <linux/device.h>
@@ -43,6 +42,7 @@
 #include <linux/cdev.h>
 #include <linux/idr.h>
 #include <linux/mutex.h>
+#include <linux/string.h>
 
 #include <asm/uaccess.h>
 
@@ -1295,7 +1295,7 @@ static void ib_ucm_remove_one(struct ib_
 	device_unregister(&ucm_dev->dev);
 }
 
-static ssize_t show_abi_version(struct class *class, char *buf)
+static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", IB_USER_CM_ABI_VERSION);
 }

Modified: stable/10/sys/ofed/drivers/infiniband/core/user_mad.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/user_mad.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/user_mad.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -34,7 +34,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/fs.h>
@@ -986,7 +985,7 @@ static ssize_t show_port(struct device *
 }
 static DEVICE_ATTR(port, S_IRUGO, show_port, NULL);
 
-static ssize_t show_abi_version(struct class *class, char *buf)
+static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", IB_USER_MAD_ABI_VERSION);
 }

Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_cmd.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -35,6 +35,7 @@
 
 #include <linux/file.h>
 #include <linux/fs.h>
+#include <linux/lockdep.h>
 
 #include <asm/uaccess.h>
 #include <asm/fcntl.h>

Modified: stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/core/uverbs_main.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -35,7 +35,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/device.h>
 #include <linux/err.h>
 #include <linux/fs.h>
@@ -565,8 +564,12 @@ struct file *ib_uverbs_alloc_event_file(
 	 * system call on a uverbs file, which will already have a
 	 * module reference.
 	 */
+#ifdef __linux__
 	filp = alloc_file(uverbs_event_mnt, dget(uverbs_event_mnt->mnt_root),
 			  FMODE_READ, fops_get(&uverbs_event_fops));
+#else
+	filp = alloc_file(FMODE_READ, fops_get(&uverbs_event_fops));
+#endif
 	if (!filp) {
 		ret = -ENFILE;
 		goto err_fd;
@@ -767,7 +770,7 @@ static ssize_t show_dev_abi_version(stru
 }
 static DEVICE_ATTR(abi_version, S_IRUGO, show_dev_abi_version, NULL);
 
-static ssize_t show_abi_version(struct class *class, char *buf)
+static ssize_t show_abi_version(struct class *class, struct class_attribute *attr, char *buf)
 {
 	return sprintf(buf, "%d\n", IB_USER_VERBS_ABI_VERSION);
 }

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/alias_GUID.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -39,7 +39,6 @@
 #include <rdma/ib_pack.h>
 #include <linux/mlx4/cmd.h>
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/errno.h>
 #include <rdma/ib_user_verbs.h>
 #include <linux/delay.h>
@@ -81,7 +80,7 @@ void mlx4_ib_update_cache_on_guid_change
 	guid_indexes = be64_to_cpu((__force __be64) dev->sriov.alias_guid.
 				   ports_guid[port_num - 1].
 				   all_rec_per_port[block_num].guid_indexes);
-	pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, guid_indexes);
+	pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, (long long)guid_indexes);
 
 	for (i = 0; i < NUM_ALIAS_GUID_IN_REC; i++) {
 		/* The location of the specific index starts from bit number 4
@@ -145,7 +144,7 @@ void mlx4_ib_notify_slaves_on_guid_chang
 	guid_indexes = be64_to_cpu((__force __be64) dev->sriov.alias_guid.
 				   ports_guid[port_num - 1].
 				   all_rec_per_port[block_num].guid_indexes);
-	pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, guid_indexes);
+	pr_debug("port: %d, guid_indexes: 0x%llx\n", port_num, (long long)guid_indexes);
 
 	/*calculate the slaves and notify them*/
 	for (i = 0; i < NUM_ALIAS_GUID_IN_REC; i++) {

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/cm.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -333,7 +333,7 @@ int mlx4_ib_demux_cm_handler(struct ib_d
 		*slave = mlx4_ib_find_real_gid(ibdev, port, gid.global.interface_id);
 		if (*slave < 0) {
 			mlx4_ib_warn(ibdev, "failed matching slave_id by gid (0x%llx)\n",
-					gid.global.interface_id);
+					(long long)gid.global.interface_id);
 			return -ENOENT;
 		}
 		return 0;

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mad.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -1664,12 +1664,12 @@ static void mlx4_ib_tunnel_comp_worker(s
 							     (MLX4_NUM_TUNNEL_BUFS - 1));
 				if (ret)
 					pr_err("Failed reposting tunnel "
-					       "buf:%lld\n", wc.wr_id);
+					       "buf:%lld\n", (long long)wc.wr_id);
 				break;
 			case IB_WC_SEND:
 				pr_debug("received tunnel send completion:"
 					 "wrid=0x%llx, status=0x%x\n",
-					 wc.wr_id, wc.status);
+					 (long long)wc.wr_id, wc.status);
 				ib_destroy_ah(tun_qp->tx_ring[wc.wr_id &
 					      (MLX4_NUM_TUNNEL_BUFS - 1)].ah);
 				tun_qp->tx_ring[wc.wr_id & (MLX4_NUM_TUNNEL_BUFS - 1)].ah
@@ -1685,7 +1685,7 @@ static void mlx4_ib_tunnel_comp_worker(s
 		} else  {
 			pr_debug("mlx4_ib: completion error in tunnel: %d."
 				 " status = %d, wrid = 0x%llx\n",
-				 ctx->slave, wc.status, wc.wr_id);
+				 ctx->slave, wc.status, (long long)wc.wr_id);
 			if (!MLX4_TUN_IS_RECV(wc.wr_id)) {
 				ib_destroy_ah(tun_qp->tx_ring[wc.wr_id &
 					      (MLX4_NUM_TUNNEL_BUFS - 1)].ah);
@@ -1837,7 +1837,7 @@ static void mlx4_ib_sqp_comp_worker(stru
 				if (mlx4_ib_post_pv_qp_buf(ctx, sqp, wc.wr_id &
 							   (MLX4_NUM_TUNNEL_BUFS - 1)))
 					pr_err("Failed reposting SQP "
-					       "buf:%lld\n", wc.wr_id);
+					       "buf:%lld\n", (long long)wc.wr_id);
 				break;
 			default:
 				BUG_ON(1);
@@ -1846,7 +1846,7 @@ static void mlx4_ib_sqp_comp_worker(stru
 		} else  {
 			pr_debug("mlx4_ib: completion error in tunnel: %d."
 				 " status = %d, wrid = 0x%llx\n",
-				 ctx->slave, wc.status, wc.wr_id);
+				 ctx->slave, wc.status, (long long)wc.wr_id);
 			if (!MLX4_TUN_IS_RECV(wc.wr_id)) {
 				ib_destroy_ah(sqp->tx_ring[wc.wr_id &
 					      (MLX4_NUM_TUNNEL_BUFS - 1)].ah);

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/main.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -37,15 +37,14 @@
 #include <linux/proc_fs.h>
 #endif
 
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/errno.h>
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
-#include <linux/rtnetlink.h>
 #include <linux/if_vlan.h>
 #include <linux/bitops.h>
 #include <linux/if_ether.h>
+#include <linux/fs.h>
 
 #include <rdma/ib_smi.h>
 #include <rdma/ib_user_verbs.h>

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mlx4_ib.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -38,6 +38,7 @@
 #include <linux/list.h>
 #include <linux/mutex.h>
 #include <linux/idr.h>
+#include <linux/notifier.h>
 
 #include <rdma/ib_verbs.h>
 #include <rdma/ib_umem.h>

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/mr.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -159,7 +159,7 @@ static int mlx4_ib_umem_write_mtt_block(
 	if (len & (mtt_size-1ULL)) {
 		WARN(1 ,
 		"write_block: len %llx is not aligned to mtt_size %llx\n",
-			len, mtt_size);
+			(long long)len, (long long)mtt_size);
 		return -EINVAL;
 	}
 
@@ -416,7 +416,7 @@ int mlx4_ib_umem_calc_optimal_mtt_size(s
 
 	WARN((total_len & ((1ULL<<block_shift)-1ULL)),
 		" misaligned total length detected (%llu, %llu)!",
-		total_len, block_shift);
+		(long long)total_len, (long long)block_shift);
 
 	*num_of_mtts = total_len >> block_shift;
 end:
@@ -426,7 +426,7 @@ end:
 		*/
 		WARN(1,
 		"mlx4_ib_umem_calc_optimal_mtt_size - unexpected shift %lld\n",
-		block_shift);
+		(long long)block_shift);
 
 		block_shift = min_shift;
 	}

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/qp.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -34,7 +34,6 @@
 #include <linux/log2.h>
 #include <linux/slab.h>
 #include <linux/netdevice.h>
-#include <linux/bitmap.h>
 #include <linux/bitops.h>
 
 #include <rdma/ib_cache.h>

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mlx4/sysfs.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -34,6 +34,7 @@
 #include "mlx4_ib.h"
 #include <linux/slab.h>
 #include <linux/string.h>
+#include <linux/fs.h>
 
 #include <rdma/ib_mad.h>
 /*show_admin_alias_guid returns the administratively assigned value of that GUID.

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_allocator.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -32,7 +32,6 @@
 
 #include <linux/errno.h>
 #include <linux/slab.h>
-#include <linux/bitmap.h>
 
 #include "mthca_dev.h"
 

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -33,7 +33,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
 #include <linux/interrupt.h>

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_provider.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -40,6 +40,7 @@
 
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/fs.h>
 
 #include "mthca_dev.h"
 #include "mthca_cmd.h"

Modified: stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/hw/mthca/mthca_reset.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -30,7 +30,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
 #include <linux/delay.h>

Modified: stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -40,7 +40,6 @@ static	int ipoib_resolvemulti(struct ifn
 
 #include <linux/module.h>
 
-#include <linux/init.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/vmalloc.h>

Modified: stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
==============================================================================
--- stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -702,6 +702,7 @@ void sdp_do_posts(struct sdp_sock *ssk);
 void sdp_rx_comp_full(struct sdp_sock *ssk);
 
 /* sdp_zcopy.c */
+struct kiocb;
 int sdp_sendmsg_zcopy(struct kiocb *iocb, struct socket *sk, struct iovec *iov);
 int sdp_handle_srcavail(struct sdp_sock *ssk, struct sdp_srcah *srcah);
 void sdp_handle_sendsm(struct sdp_sock *ssk, u32 mseq_ack);

Modified: stable/10/sys/ofed/drivers/net/mlx4/alloc.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/alloc.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/alloc.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -34,8 +34,7 @@
 #include <linux/errno.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
-//#include <linux/export.h>  /* XXX SK probabaly not needed in freeBSD XXX */
-#include <linux/bitmap.h>
+#include <linux/bitops.h>
 #include <linux/dma-mapping.h>
 #include <linux/vmalloc.h>
 

Modified: stable/10/sys/ofed/drivers/net/mlx4/cmd.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/cmd.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/cmd.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -640,7 +640,7 @@ static int mlx4_ACCESS_MEM(struct mlx4_d
 	    (slave & ~0x7f) | (size & 0xff)) {
 		mlx4_err(dev, "Bad access mem params - slave_addr:0x%llx "
 			      "master_addr:0x%llx slave_id:%d size:%d\n",
-			      slave_addr, master_addr, slave, size);
+			      (long long)slave_addr, (long long)master_addr, slave, size);
 		return -EINVAL;
 	}
 
@@ -1553,7 +1553,7 @@ static int mlx4_master_activate_admin_st
 				return err;
 			}
 			mlx4_dbg((&(priv->dev)), "alloc mac %llx idx  %d slave %d port %d\n",
-				 vp_oper->state.mac, vp_oper->mac_idx, slave, port);
+				 (long long)vp_oper->state.mac, vp_oper->mac_idx, slave, port);
 		}
 	}
 	return 0;
@@ -2117,7 +2117,7 @@ int mlx4_set_vf_mac(struct mlx4_dev *dev
 	s_info = &priv->mfunc.master.vf_admin[vf].vport[port];
 	s_info->mac = mlx4_mac_to_u64(mac);
 	mlx4_info(dev, "default mac on vf %d port %d to %llX will take afect only after vf restart\n",
-		  vf, port, s_info->mac);
+		  vf, port, (long long)s_info->mac);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(mlx4_set_vf_mac);

Modified: stable/10/sys/ofed/drivers/net/mlx4/cq.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/cq.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/cq.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -34,7 +34,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
 #include <linux/hardirq.h>
 
 #include <linux/mlx4/cmd.h>

Modified: stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/en_netdev.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -1580,7 +1580,7 @@ int mlx4_en_init_netdev(struct mlx4_en_d
 
 	if (ILLEGAL_MAC(priv->mac)) {
 		en_err(priv, "Port: %d, invalid mac burned: 0x%llx, quiting\n",
-			 priv->port, priv->mac);
+			 priv->port, (long long)priv->mac);
 		err = -EINVAL;
 		goto out;
 	}

Modified: stable/10/sys/ofed/drivers/net/mlx4/en_rx.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/en_rx.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/en_rx.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -136,7 +136,7 @@ static void mlx4_en_free_rx_desc(struct 
  		frag_info = &priv->frag_info[nr];
 		dma = be64_to_cpu(rx_desc->data[nr].addr);
 
-		en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (u64) dma);
+		en_dbg(DRV, priv, "Unmaping buffer at dma:0x%llx\n", (long long) dma);
 		pci_unmap_single(mdev->pdev, dma, frag_info->frag_size,
 				 PCI_DMA_FROMDEVICE);
 		m_free(mb_list[nr]);

Modified: stable/10/sys/ofed/drivers/net/mlx4/eq.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/eq.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/eq.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -31,7 +31,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
 #include <linux/mm.h>

Modified: stable/10/sys/ofed/drivers/net/mlx4/fw.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/fw.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/fw.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -1078,14 +1078,14 @@ int mlx4_QUERY_FW(struct mlx4_dev *dev)
 	MLX4_GET(fw->comm_bar,  outbox, QUERY_FW_COMM_BAR_OFFSET);
 	fw->comm_bar = (fw->comm_bar >> 6) * 2;
 	mlx4_dbg(dev, "Communication vector bar:%d offset:0x%llx\n",
-		 fw->comm_bar, fw->comm_base);
+		 fw->comm_bar, (long long)fw->comm_base);
 	mlx4_dbg(dev, "FW size %d KB\n", fw->fw_pages >> 2);
 
 	MLX4_GET(fw->clock_offset, outbox, QUERY_FW_CLOCK_OFFSET);
 	MLX4_GET(fw->clock_bar,    outbox, QUERY_FW_CLOCK_BAR);
 	fw->clock_bar = (fw->clock_bar >> 6) * 2;
 	mlx4_dbg(dev, "Internal clock bar:%d offset:0x%llx\n",
-		 fw->comm_bar, fw->comm_base);
+		 fw->comm_bar, (long long)fw->comm_base);
 
 	/*
 	 * Round up number of system pages needed in case

Modified: stable/10/sys/ofed/drivers/net/mlx4/main.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/main.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/main.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -34,7 +34,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
 #include <linux/dma-mapping.h>
@@ -42,6 +41,7 @@
 #include <linux/io-mapping.h>
 #include <linux/delay.h>
 #include <linux/netdevice.h>
+#include <linux/fs.h>
 
 #include <linux/mlx4/device.h>
 #include <linux/mlx4/doorbell.h>

Modified: stable/10/sys/ofed/drivers/net/mlx4/mcg.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/mcg.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/mcg.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -886,7 +886,7 @@ int mlx4_flow_detach(struct mlx4_dev *de
 	err = mlx4_QP_FLOW_STEERING_DETACH(dev, reg_id);
 	if (err)
 		mlx4_err(dev, "Fail to detach network rule. registration id = 0x%llx\n",
-			 reg_id);
+			 (long long)reg_id);
 	return err;
 }
 EXPORT_SYMBOL_GPL(mlx4_flow_detach);

Modified: stable/10/sys/ofed/drivers/net/mlx4/mr.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/mr.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/mr.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -32,7 +32,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/slab.h>
 #include <linux/kernel.h>

Modified: stable/10/sys/ofed/drivers/net/mlx4/pd.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/pd.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/pd.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -31,7 +31,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/io-mapping.h>
 

Modified: stable/10/sys/ofed/drivers/net/mlx4/qp.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/qp.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/qp.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -33,8 +33,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
-
 #include <linux/mlx4/cmd.h>
 #include <linux/mlx4/qp.h>
 

Modified: stable/10/sys/ofed/drivers/net/mlx4/reset.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/reset.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/reset.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -31,7 +31,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/pci.h>
 #include <linux/delay.h>

Modified: stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/resource_tracker.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -1166,7 +1166,7 @@ static int qp_res_start_move_to(struct m
 		switch (state) {
 		case RES_QP_BUSY:
 			mlx4_dbg(dev, "%s: failed RES_QP, 0x%llx\n",
-				 __func__, r->com.res_id);
+				 __func__, (long long)r->com.res_id);
 			err = -EBUSY;
 			break;
 
@@ -1174,7 +1174,7 @@ static int qp_res_start_move_to(struct m
 			if (r->com.state == RES_QP_MAPPED && !alloc)
 				break;
 
-			mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", r->com.res_id);
+			mlx4_dbg(dev, "failed RES_QP, 0x%llx\n", (long long)r->com.res_id);
 			err = -EINVAL;
 			break;
 
@@ -1184,7 +1184,7 @@ static int qp_res_start_move_to(struct m
 				break;
 			else {
 				mlx4_dbg(dev, "failed RES_QP, 0x%llx\n",
-					  r->com.res_id);
+					  (long long)r->com.res_id);
 				err = -EINVAL;
 			}
 
@@ -3766,7 +3766,7 @@ static int _move_all_busy(struct mlx4_de
 						mlx4_dbg(dev,
 							 "%s id 0x%llx is busy\n",
 							  ResourceType(type),
-							  r->res_id);
+							  (long long)r->res_id);
 					++busy;
 				} else {
 					r->from_state = r->state;

Modified: stable/10/sys/ofed/drivers/net/mlx4/sense.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/sense.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/sense.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -53,7 +53,7 @@ int mlx4_SENSE_PORT(struct mlx4_dev *dev
 	}
 
 	if (out_param > 2) {
-		mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", out_param);
+		mlx4_err(dev, "Sense returned illegal value: 0x%llx\n", (long long)out_param);
 		return -EINVAL;
 	}
 

Modified: stable/10/sys/ofed/drivers/net/mlx4/srq.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/srq.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/srq.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -31,8 +31,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
-
 #include <linux/mlx4/cmd.h>
 #include <linux/gfp.h>
 

Modified: stable/10/sys/ofed/drivers/net/mlx4/xrcd.c
==============================================================================
--- stable/10/sys/ofed/drivers/net/mlx4/xrcd.c	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/drivers/net/mlx4/xrcd.c	Thu Sep  4 20:12:36 2014	(r271127)
@@ -31,7 +31,6 @@
  * SOFTWARE.
  */
 
-#include <linux/init.h>
 #include <linux/errno.h>
 
 #include "mlx4.h"

Modified: stable/10/sys/ofed/include/asm/atomic-long.h
==============================================================================
--- stable/10/sys/ofed/include/asm/atomic-long.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/atomic-long.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,6 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef	_ATOMIC_LONG_H_
 #define	_ATOMIC_LONG_H_
 

Modified: stable/10/sys/ofed/include/asm/atomic.h
==============================================================================
--- stable/10/sys/ofed/include/asm/atomic.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/atomic.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -32,7 +33,6 @@
 #include <sys/cdefs.h>
 #include <sys/types.h>
 #include <machine/atomic.h>
-#include <asm/atomic-long.h>
 
 typedef struct {
 	volatile u_int counter;
@@ -90,7 +90,6 @@ static inline int atomic_add_unless(atom
         for (;;) {
                 if (unlikely(c == (u)))
                         break;
-                // old = atomic_cmpxchg((v), c, c + (a)); /*Linux*/
                 old = atomic_cmpset_int(&v->counter, c, c + (a));
                 if (likely(old == c))
                         break;

Modified: stable/10/sys/ofed/include/asm/byteorder.h
==============================================================================
--- stable/10/sys/ofed/include/asm/byteorder.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/byteorder.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,6 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef	_ASM_BYTEORDER_H_
 #define	_ASM_BYTEORDER_H_
 

Modified: stable/10/sys/ofed/include/asm/fcntl.h
==============================================================================
--- stable/10/sys/ofed/include/asm/fcntl.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/fcntl.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: stable/10/sys/ofed/include/asm/io.h
==============================================================================
--- stable/10/sys/ofed/include/asm/io.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/io.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -1,7 +1,8 @@
-/*-
+/*
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,4 +27,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _ASM_IO_H_
+#define _ASM_IO_H_
+
 #include <linux/io.h>
+
+#endif	/* _ASM_IO_H_ */

Modified: stable/10/sys/ofed/include/asm/page.h
==============================================================================
--- stable/10/sys/ofed/include/asm/page.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/page.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,4 +27,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _ASM_PAGE_H_
+#define _ASM_PAGE_H_
+
 #include <linux/page.h>
+
+#endif /*_ASM_PAGE_H_*/

Modified: stable/10/sys/ofed/include/asm/pgtable.h
==============================================================================
--- stable/10/sys/ofed/include/asm/pgtable.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/pgtable.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without

Modified: stable/10/sys/ofed/include/asm/types.h
==============================================================================
--- stable/10/sys/ofed/include/asm/types.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/types.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,43 +26,36 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef	_ASM_TYPES_H_
 #define	_ASM_TYPES_H_
 
-typedef unsigned short umode_t;
-
-typedef signed char __s8;
-typedef unsigned char __u8;
-
-typedef signed short __s16;
-typedef unsigned short __u16;
-
-typedef signed int __s32;
-typedef unsigned int __u32;
-
-#if defined(__GNUC__) // && !defined(__STRICT_ANSI__)
-typedef signed long long __s64;
-typedef unsigned long long __u64;
-#endif
-
 #ifdef _KERNEL
 
-typedef signed char s8;
-typedef unsigned char u8;
-
-typedef signed short s16;
-typedef unsigned short u16;
-
-typedef signed int s32;
-typedef unsigned int u32;
-
-typedef signed long long s64;
-typedef unsigned long long u64;
+typedef uint8_t u8;
+typedef uint8_t __u8;
+typedef uint16_t u16;
+typedef uint16_t __u16;
+typedef uint32_t u32;
+typedef uint32_t __u32;
+typedef uint64_t u64;
+typedef uint64_t __u64;
+
+typedef int8_t s8;
+typedef int8_t __s8;
+typedef int16_t s16;
+typedef int16_t __s16;
+typedef int32_t s32;
+typedef int32_t __s32;
+typedef int64_t s64;
+typedef int64_t __s64;
 
 /* DMA addresses come in generic and 64-bit flavours.  */
 typedef vm_paddr_t dma_addr_t;
 typedef vm_paddr_t dma64_addr_t;
 
+typedef unsigned short umode_t;
+
 #endif	/* _KERNEL */
 
 #endif	/* _ASM_TYPES_H_ */

Modified: stable/10/sys/ofed/include/asm/uaccess.h
==============================================================================
--- stable/10/sys/ofed/include/asm/uaccess.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/asm/uaccess.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -25,6 +26,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+
 #ifndef _ASM_UACCESS_H_
 #define _ASM_UACCESS_H_
 

Modified: stable/10/sys/ofed/include/linux/bitops.h
==============================================================================
--- stable/10/sys/ofed/include/linux/bitops.h	Thu Sep  4 20:07:44 2014	(r271126)
+++ stable/10/sys/ofed/include/linux/bitops.h	Thu Sep  4 20:12:36 2014	(r271127)
@@ -2,6 +2,7 @@
  * Copyright (c) 2010 Isilon Systems, Inc.
  * Copyright (c) 2010 iX Systems, Inc.
  * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -37,6 +38,8 @@
 #define	BITS_TO_LONGS(n)	howmany((n), BITS_PER_LONG)
 #define BIT_WORD(nr)		((nr) / BITS_PER_LONG)
 
+#define BITS_PER_BYTE           8
+
 static inline int
 __ffs(int mask)
 {
@@ -463,6 +466,27 @@ bitmap_find_free_region(unsigned long *b
 }
 
 /**
+ * bitmap_allocate_region - allocate bitmap region
+ *      @bitmap: array of unsigned longs corresponding to the bitmap
+ *      @pos: beginning of bit region to allocate
+ *      @order: region size (log base 2 of number of bits) to allocate
+ *
+ * Allocate (set bits in) a specified region of a bitmap.
+ *
+ * Return 0 on success, or %-EBUSY if specified region wasn't
+ * free (not all bits were zero).
+ */
+
+static inline int
+bitmap_allocate_region(unsigned long *bitmap, int pos, int order)
+{
+        if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE))
+                return -EBUSY;
+        __reg_op(bitmap, pos, order, REG_OP_ALLOC);
+        return 0;
+}
+
+/**
  * bitmap_release_region - release allocated bitmap region
  *      @bitmap: array of unsigned longs corresponding to the bitmap
  *      @pos: beginning of bit region to release
@@ -480,4 +504,9 @@ bitmap_release_region(unsigned long *bit
 }
 
 
+#define for_each_set_bit(bit, addr, size) \
+	for ((bit) = find_first_bit((addr), (size));		\
+	     (bit) < (size);					\
+	     (bit) = find_next_bit((addr), (size), (bit) + 1))
+
 #endif	/* _LINUX_BITOPS_H_ */

Copied: stable/10/sys/ofed/include/linux/cache.h (from r270710, head/sys/ofed/include/linux/cache.h)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/10/sys/ofed/include/linux/cache.h	Thu Sep  4 20:12:36 2014	(r271127, copy of r270710, head/sys/ofed/include/linux/cache.h)
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2010 Isilon Systems, Inc.
+ * Copyright (c) 2010 iX Systems, Inc.
+ * Copyright (c) 2010 Panasas, Inc.
+ * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice unmodified, this list of conditions, and the following
+ *    disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409042012.s84KCacX027491>