]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: Move rds_rtd definitions from rds_rt_debug files to common files
authorAvinash Repaka <avinash.repaka@oracle.com>
Wed, 18 May 2016 22:09:05 +0000 (15:09 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 25 May 2016 03:52:51 +0000 (20:52 -0700)
This patch moves rds_rtd definitions from rds_rtd_debug.h to rds.h and
rds_rt_debug_bitmap modparam definition from rds_rt_debug.c to af_rds.c.
The patch removes rds_rt_debug files since there isn't much content
in these files to be held separately.

Commit 'ib/rds: runtime debuggability enhancement' originally defined
rds_rtd definitions.

Orabug: 23294707

Signed-off-by: Avinash Repaka <avinash.repaka@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
net/rds/Makefile
net/rds/af_rds.c
net/rds/rds.h
net/rds/rds_rt_debug.c [deleted file]
net/rds/rds_rt_debug.h [deleted file]

index 60fb4029e0a5e990aa18686ed133c4eefc9d158c..56d3f6023ced41adb81510ec0dc8525c9230dea9 100644 (file)
@@ -1,7 +1,7 @@
 obj-$(CONFIG_RDS) += rds.o
 rds-y :=       af_rds.o bind.o cong.o connection.o info.o message.o   \
                        recv.o send.o stats.o sysctl.o threads.o transport.o \
-                       loop.o page.o rdma.o rds_rt_debug.o
+                       loop.o page.o rdma.o
 
 obj-$(CONFIG_RDS_RDMA) += rds_rdma.o
 rds_rdma-y :=  rdma_transport.o \
index 9aa99921ce2984765c7c01dc5d82ad0b2a62c85c..0adf3af3d01d0633f00b19dd90aee0da652524fd 100644 (file)
@@ -55,6 +55,12 @@ module_param(rds_qos_threshold_action, int, 0444);
 MODULE_PARM_DESC(rds_qos_threshold_action,
        "0=Ignore,1=Error,2=Statistic,3=Error_Statistic");
 
+u32 kernel_rds_rt_debug_bitmap = 0x488B;
+EXPORT_SYMBOL(kernel_rds_rt_debug_bitmap);
+module_param_named(rds_rt_debug_bitmap, kernel_rds_rt_debug_bitmap, uint, 0644);
+MODULE_PARM_DESC(rds_rt_debug_bitmap,
+                "RDS Runtime Debug Message Enabling Bitmap [default 0x488B]");
+
 static unsigned long rds_qos_threshold_tbl[256];
 
 char *rds_str_array(char **array, size_t elements, size_t index)
index 8810398e2472242266809fcf53e0cc61b8ec3240..b18ce4848cb86076b334e078d2bff97f24c5dbda 100644 (file)
@@ -11,7 +11,6 @@
 #include <uapi/linux/rds.h>
 
 #include "info.h"
-#include "rds_rt_debug.h"
 
 /*
  * RDS Network protocol version
@@ -51,6 +50,43 @@ rdsdebug(char *fmt, ...)
 }
 #endif
 
+extern u32 kernel_rds_rt_debug_bitmap;
+enum {
+       /* bit 0 ~ 19 are feature related bits */
+       RDS_RTD_ERR                     = 1 << 0,       /* 0x1    */
+       RDS_RTD_ERR_EXT                 = 1 << 1,       /* 0x2    */
+
+       RDS_RTD_CM                      = 1 << 3,       /* 0x8    */
+       RDS_RTD_CM_EXT                  = 1 << 4,       /* 0x10   */
+       RDS_RTD_CM_EXT_P                = 1 << 5,       /* 0x20   */
+
+       RDS_RTD_ACT_BND                 = 1 << 7,       /* 0x80   */
+       RDS_RTD_ACT_BND_EXT             = 1 << 8,       /* 0x100  */
+
+       RDS_RTD_RCV                     = 1 << 11,      /* 0x800  */
+       RDS_RTD_RCV_EXT                 = 1 << 12,      /* 0x1000 */
+
+       RDS_RTD_SND                     = 1 << 14,      /* 0x4000 */
+       RDS_RTD_SND_EXT                 = 1 << 15,      /* 0x8000 */
+       RDS_RTD_FLOW_CNTRL              = 1 << 16,      /* 0x10000 */
+
+       /* bit 20 ~ 31 are module specific bits */
+       RDS_RTD_CORE                    = 1 << 20,      /* 0x100000   */
+       RDS_RTD_RDMA_IB                 = 1 << 23,      /* 0x800000   */
+
+       /* the following are placeholders for now */
+       RDS_RTD_RDMA_IW                 = 1 << 26,      /* 0x4000000  */
+       RDS_RTD_TCP                     = 1 << 28,      /* 0x10000000 */
+};
+
+#define rds_rtd_printk(format, arg...)         \
+       trace_printk("%d: " format, __LINE__, ## arg)
+
+#define rds_rtd(enabling_bit, format, arg...)                               \
+       do { if (likely(!(enabling_bit & kernel_rds_rt_debug_bitmap))) break;\
+                rds_rtd_printk(format, ## arg);                             \
+       } while (0)
+
 /* XXX is there one of these somewhere? */
 #define ceil(x, y) \
        ({ unsigned long __x = (x), __y = (y); (__x + __y - 1) / __y; })
diff --git a/net/rds/rds_rt_debug.c b/net/rds/rds_rt_debug.c
deleted file mode 100644 (file)
index 61ae117..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2015 Oracle.  All rights reserved.
- *
- * This software is available to you under a choice of one of two
- * licenses.  You may choose to be licensed under the terms of the GNU
- * General Public License (GPL) Version 2, available from the file
- * COPYING in the main directory of this source tree, or the
- * OpenIB.org BSD license below:
- *
- *     Redistribution and use in source and binary forms, with or
- *     without modification, are permitted provided that the following
- *     conditions are met:
- *
- *      - Redistributions of source code must retain the above
- *        copyright notice, this list of conditions and the following
- *        disclaimer.
- *
- *      - 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.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-#include <linux/kernel.h>
-
-#include "rds.h"
-#include "rds_rt_debug.h"
-
-u32 kernel_rds_rt_debug_bitmap = 0x488B;
-EXPORT_SYMBOL(kernel_rds_rt_debug_bitmap);
-
-module_param_named(rds_rt_debug_bitmap, kernel_rds_rt_debug_bitmap, uint, 0644);
-MODULE_PARM_DESC(rds_rt_debug_bitmap, "RDS Runtime Debug Message Enabling Bitmap [default 0x488B]");
-
diff --git a/net/rds/rds_rt_debug.h b/net/rds/rds_rt_debug.h
deleted file mode 100644 (file)
index e75a48f..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef _RDS_RT_DEBUG_H
-#define _RDS_RT_DEBUG_H
-
-extern u32 kernel_rds_rt_debug_bitmap;
-
-enum {
-       /* bit 0 ~ 19 are feature related bits */
-       RDS_RTD_ERR                     = 1 << 0,       /* 0x1    */
-       RDS_RTD_ERR_EXT                 = 1 << 1,       /* 0x2    */
-
-       RDS_RTD_CM                      = 1 << 3,       /* 0x8    */
-       RDS_RTD_CM_EXT                  = 1 << 4,       /* 0x10   */
-       RDS_RTD_CM_EXT_P                = 1 << 5,       /* 0x20   */
-
-       RDS_RTD_ACT_BND                 = 1 << 7,       /* 0x80   */
-       RDS_RTD_ACT_BND_EXT             = 1 << 8,       /* 0x100  */
-
-       RDS_RTD_RCV                     = 1 << 11,      /* 0x800  */
-       RDS_RTD_RCV_EXT                 = 1 << 12,      /* 0x1000 */
-
-       RDS_RTD_SND                     = 1 << 14,      /* 0x4000 */
-       RDS_RTD_SND_EXT                 = 1 << 15,      /* 0x8000 */
-       RDS_RTD_FLOW_CNTRL              = 1 << 16,      /* 0x10000 */
-
-       /* bit 20 ~ 31 are module specific bits */
-       RDS_RTD_CORE                    = 1 << 20,      /* 0x100000   */
-       RDS_RTD_RDMA_IB                 = 1 << 23,      /* 0x800000   */
-
-       /* the following are placeholders for now */
-       RDS_RTD_RDMA_IW                 = 1 << 26,      /* 0x4000000  */
-       RDS_RTD_TCP                     = 1 << 28,      /* 0x10000000 */
-};
-
-#define rds_rtd_printk(format, arg...)         \
-       trace_printk("%d: " format, __LINE__, ## arg)
-
-#define rds_rtd(enabling_bit, format, arg...)                                 \
-       do {  if (likely(!(enabling_bit & kernel_rds_rt_debug_bitmap))) break; \
-                rds_rtd_printk(format, ## arg);                       \
-       } while (0)
-
-#endif /* _RDS_RT_DEBUG_H */
-