aboutsummaryrefslogtreecommitdiff
path: root/sys/ofed
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2016-05-25 12:03:21 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2016-05-25 12:03:21 +0000
commitfa201e28fc1accfed6bbf97bc3f20f067258344b (patch)
tree73f54a7eb35fc5a4152b6c01d5c2eba818c792ba /sys/ofed
parentce35ddbc7473c4b89657346536d6b7b26801c4d5 (diff)
downloadsrc-fa201e28fc1accfed6bbf97bc3f20f067258344b.tar.gz
src-fa201e28fc1accfed6bbf97bc3f20f067258344b.zip
Prepare for activation of LinuxKPI module parameters as read-only
tunable SYSCTL's. Linux module parameters are associated with the module they belong to. FreeBSD does not share this concept of a parent module. Instead add macros which define the prefix to use for the module parameters in the LinuxKPI consumers. While at it convert all "bool" LinuxKPI module parameters to "byte" type, because we don't have a "bool" type of SYSCTL in FreeBSD. Sponsored by: Mellanox Technologies MFC after: 1 week
Notes
Notes: svn path=/head/; revision=300676
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/drivers/infiniband/core/cma.c2
-rw-r--r--sys/ofed/drivers/infiniband/core/mad.c3
-rw-r--r--sys/ofed/drivers/infiniband/core/multicast.c2
-rw-r--r--sys/ofed/drivers/infiniband/core/umem.c2
-rw-r--r--sys/ofed/drivers/infiniband/core/uverbs_cmd.c2
-rw-r--r--sys/ofed/drivers/infiniband/debug/memtrack.c2
-rw-r--r--sys/ofed/drivers/infiniband/hw/mlx4/main.c2
-rw-r--r--sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c2
-rw-r--r--sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c2
-rw-r--r--sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c2
-rw-r--r--sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h2
-rw-r--r--sys/ofed/drivers/infiniband/ulp/sdp/sdp.h2
-rw-r--r--sys/ofed/drivers/infiniband/util/madeye.c3
-rw-r--r--sys/ofed/drivers/net/mlx4/catas.c2
-rw-r--r--sys/ofed/drivers/net/mlx4/en_main.c2
-rw-r--r--sys/ofed/drivers/net/mlx4/en_tx.c2
-rw-r--r--sys/ofed/drivers/net/mlx4/fw.c6
-rw-r--r--sys/ofed/drivers/net/mlx4/main.c2
-rw-r--r--sys/ofed/drivers/net/mlx4/port.c2
19 files changed, 42 insertions, 2 deletions
diff --git a/sys/ofed/drivers/infiniband/core/cma.c b/sys/ofed/drivers/infiniband/core/cma.c
index aa1f2ec313dd..27e61948c09a 100644
--- a/sys/ofed/drivers/infiniband/core/cma.c
+++ b/sys/ofed/drivers/infiniband/core/cma.c
@@ -34,6 +34,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX ibcore_
+
#include <linux/completion.h>
#include <linux/in.h>
#include <linux/in6.h>
diff --git a/sys/ofed/drivers/infiniband/core/mad.c b/sys/ofed/drivers/infiniband/core/mad.c
index a78dd3ac10fc..23d6844d5131 100644
--- a/sys/ofed/drivers/infiniband/core/mad.c
+++ b/sys/ofed/drivers/infiniband/core/mad.c
@@ -33,6 +33,9 @@
* SOFTWARE.
*
*/
+
+#define LINUXKPI_PARAM_PREFIX ibcore_
+
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <linux/module.h>
diff --git a/sys/ofed/drivers/infiniband/core/multicast.c b/sys/ofed/drivers/infiniband/core/multicast.c
index ef595b247cec..4df22eea1dad 100644
--- a/sys/ofed/drivers/infiniband/core/multicast.c
+++ b/sys/ofed/drivers/infiniband/core/multicast.c
@@ -30,6 +30,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX ibcore_
+
#include <linux/completion.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
diff --git a/sys/ofed/drivers/infiniband/core/umem.c b/sys/ofed/drivers/infiniband/core/umem.c
index 5f4465f97165..db1969af293d 100644
--- a/sys/ofed/drivers/infiniband/core/umem.c
+++ b/sys/ofed/drivers/infiniband/core/umem.c
@@ -32,6 +32,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX ibcore_
+
#include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/sched.h>
diff --git a/sys/ofed/drivers/infiniband/core/uverbs_cmd.c b/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
index 2e726aeec614..7f87a6c9ac11 100644
--- a/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
+++ b/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
@@ -33,6 +33,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX ibcore_
+
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/slab.h>
diff --git a/sys/ofed/drivers/infiniband/debug/memtrack.c b/sys/ofed/drivers/infiniband/debug/memtrack.c
index 6c8d5df34918..cfbc4872a2b2 100644
--- a/sys/ofed/drivers/infiniband/debug/memtrack.c
+++ b/sys/ofed/drivers/infiniband/debug/memtrack.c
@@ -19,6 +19,8 @@
Copyright (c) 2004 Mellanox Technologies Ltd. All rights reserved.
*/
+#define LINUXKPI_PARAM_PREFIX memtrack_
+
#define C_MEMTRACK_C
#ifdef kmalloc
diff --git a/sys/ofed/drivers/infiniband/hw/mlx4/main.c b/sys/ofed/drivers/infiniband/hw/mlx4/main.c
index cff90cc6592f..da5ec04ccb0a 100644
--- a/sys/ofed/drivers/infiniband/hw/mlx4/main.c
+++ b/sys/ofed/drivers/infiniband/hw/mlx4/main.c
@@ -31,6 +31,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mlx4_
+
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/errno.h>
diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c b/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c
index b200170c61e8..7f72140f227c 100644
--- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c
+++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_catas.c
@@ -30,6 +30,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mthca_
+
#include <linux/jiffies.h>
#include <linux/timer.h>
#include <linux/workqueue.h>
diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c b/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c
index f9d187288476..d759750e5355 100644
--- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c
+++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_cmd.c
@@ -32,6 +32,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mthca_
+
#include <linux/completion.h>
#include <linux/pci.h>
#include <linux/errno.h>
diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c b/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
index 697af31f4dbf..c7e9851e70e0 100644
--- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
@@ -32,6 +32,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mthca_
+
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/pci.h>
diff --git a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h
index acf3d542c896..ed2b91c23e43 100644
--- a/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -35,6 +35,8 @@
#ifndef _IPOIB_H
#define _IPOIB_H
+#define LINUXKPI_PARAM_PREFIX ipoib_
+
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ofed.h"
diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h b/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
index bd07d4901773..c5b6aa644e3c 100644
--- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
+++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp.h
@@ -1,6 +1,8 @@
#ifndef _SDP_H_
#define _SDP_H_
+#define LINUXKPI_PARAM_PREFIX ib_sdp_
+
#include "opt_ddb.h"
#include "opt_inet.h"
#include "opt_ofed.h"
diff --git a/sys/ofed/drivers/infiniband/util/madeye.c b/sys/ofed/drivers/infiniband/util/madeye.c
index 2c650a33a69c..975c7d949830 100644
--- a/sys/ofed/drivers/infiniband/util/madeye.c
+++ b/sys/ofed/drivers/infiniband/util/madeye.c
@@ -32,6 +32,9 @@
*
* $Id$
*/
+
+#define LINUXKPI_PARAM_PREFIX ib_madeye_
+
#include <linux/module.h>
#include <linux/device.h>
#include <linux/err.h>
diff --git a/sys/ofed/drivers/net/mlx4/catas.c b/sys/ofed/drivers/net/mlx4/catas.c
index f62c16c9f583..497e0ddb8956 100644
--- a/sys/ofed/drivers/net/mlx4/catas.c
+++ b/sys/ofed/drivers/net/mlx4/catas.c
@@ -31,6 +31,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mlx4_
+
#include <linux/workqueue.h>
#include <linux/module.h>
diff --git a/sys/ofed/drivers/net/mlx4/en_main.c b/sys/ofed/drivers/net/mlx4/en_main.c
index 95730965162c..7cff16bbba27 100644
--- a/sys/ofed/drivers/net/mlx4/en_main.c
+++ b/sys/ofed/drivers/net/mlx4/en_main.c
@@ -31,6 +31,8 @@
*
*/
+#define LINUXKPI_PARAM_PREFIX mlx4_
+
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
diff --git a/sys/ofed/drivers/net/mlx4/en_tx.c b/sys/ofed/drivers/net/mlx4/en_tx.c
index 463efec9f125..9090c51679dd 100644
--- a/sys/ofed/drivers/net/mlx4/en_tx.c
+++ b/sys/ofed/drivers/net/mlx4/en_tx.c
@@ -31,6 +31,8 @@
*
*/
+#define LINUXKPI_PARAM_PREFIX mlx4_
+
#include <linux/page.h>
#include <linux/mlx4/cq.h>
#include <linux/slab.h>
diff --git a/sys/ofed/drivers/net/mlx4/fw.c b/sys/ofed/drivers/net/mlx4/fw.c
index a16ede61d4a2..e2909fa60f89 100644
--- a/sys/ofed/drivers/net/mlx4/fw.c
+++ b/sys/ofed/drivers/net/mlx4/fw.c
@@ -32,6 +32,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mlx4_
+
#include <linux/etherdevice.h>
#include <linux/mlx4/cmd.h>
#include <linux/module.h>
@@ -49,8 +51,8 @@ enum {
extern void __buggy_use_of_MLX4_GET(void);
extern void __buggy_use_of_MLX4_PUT(void);
-static bool enable_qos;
-module_param(enable_qos, bool, 0444);
+static u8 enable_qos;
+module_param(enable_qos, byte, 0444);
MODULE_PARM_DESC(enable_qos, "Enable Quality of Service support in the HCA (default: off)");
#define MLX4_GET(dest, source, offset) \
diff --git a/sys/ofed/drivers/net/mlx4/main.c b/sys/ofed/drivers/net/mlx4/main.c
index 10ba359631b6..78e8f1bb585e 100644
--- a/sys/ofed/drivers/net/mlx4/main.c
+++ b/sys/ofed/drivers/net/mlx4/main.c
@@ -33,6 +33,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mlx4_
+
#include <linux/kmod.h>
#include <linux/module.h>
#include <linux/errno.h>
diff --git a/sys/ofed/drivers/net/mlx4/port.c b/sys/ofed/drivers/net/mlx4/port.c
index 9ef63f7a2d90..aeb38746cbd5 100644
--- a/sys/ofed/drivers/net/mlx4/port.c
+++ b/sys/ofed/drivers/net/mlx4/port.c
@@ -30,6 +30,8 @@
* SOFTWARE.
*/
+#define LINUXKPI_PARAM_PREFIX mlx4_
+
#include <linux/errno.h>
#include <linux/if_ether.h>
#include <linux/module.h>