Thread (4 messages) read the whole thread 4 messages, 4 authors, 2016-07-18
STALE3667d

[PATCH] cxl: add option to enable -DDEBUG

From: Andrew Donnellan <hidden>
Date: 2016-07-18 08:18:00
Subsystem: char and misc drivers, the rest · Maintainers: Arnd Bergmann, Greg Kroah-Hartman, Linus Torvalds

Developers working on AFUs and AFU drivers often find it useful to see the
pr_devel() and dev_dbg() messages from cxl. Give them an easy way to enable
-DDEBUG by adding a Kconfig option, CONFIG_CXL_DEBUG.

Inspired-by: Uma Krishnan [off-list ref]
Signed-off-by: Andrew Donnellan <redacted>
---
 drivers/misc/cxl/Kconfig  | 12 ++++++++++++
 drivers/misc/cxl/Makefile |  1 +
 2 files changed, 13 insertions(+)
diff --git a/drivers/misc/cxl/Kconfig b/drivers/misc/cxl/Kconfig
index b75cf83..88ad9f1 100644
--- a/drivers/misc/cxl/Kconfig
+++ b/drivers/misc/cxl/Kconfig
@@ -36,3 +36,15 @@ config CXL_BIMODAL
 	help
 	  Select this option to enable support for bi-modal CAPI cards, such as
 	  the Mellanox CX-4.
+
+config CXL_DEBUG
+	bool "Enable additional CXL debug output"
+	depends on CXL
+	default n
+	help
+	  Select this option to enable additional debug output from the cxl
+	  driver. This may be useful if you're developing or debugging a CAPI
+	  Accelerator Function Unit or cxl-dependent device driver, but is
+	  generally not useful for end users.
+
+	  If unsure, say N.
diff --git a/drivers/misc/cxl/Makefile b/drivers/misc/cxl/Makefile
index 8a55c1a..620b132 100644
--- a/drivers/misc/cxl/Makefile
+++ b/drivers/misc/cxl/Makefile
@@ -1,5 +1,6 @@
 ccflags-y			:= $(call cc-disable-warning, unused-const-variable)
 ccflags-$(CONFIG_PPC_WERROR)	+= -Werror
+ccflags-$(CONFIG_CXL_DEBUG)	+= -DDEBUG
 
 cxl-y				+= main.o file.o irq.o fault.o native.o
 cxl-y				+= context.o sysfs.o debugfs.o pci.o trace.o
-- 
Andrew Donnellan              OzLabs, ADL Canberra
andrew.donnellan@au1.ibm.com  IBM Australia Limited
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help