From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Cc: imunsie@au1.ibm.com, ukrishn@linux.vnet.ibm.com,
fbarrat@linux.vnet.ibm.com, vaibhav@linux.vnet.ibm.com,
clombard@linux.vnet.ibm.com, felix@linux.vnet.ibm.com
Subject: [PATCH] cxl: add option to enable -DDEBUG
Date: Mon, 18 Jul 2016 18:17:37 +1000 [thread overview]
Message-ID: <1468829857-821-1-git-send-email-andrew.donnellan@au1.ibm.com> (raw)
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 <ukrishn@linux.vnet.ibm.com>
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
---
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
next reply other threads:[~2016-07-18 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-18 8:17 Andrew Donnellan [this message]
2016-07-18 8:19 ` [PATCH] cxl: add option to enable -DDEBUG Ian Munsie
2016-07-18 10:49 ` Michael Ellerman
2016-07-18 13:54 ` Uma Krishnan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468829857-821-1-git-send-email-andrew.donnellan@au1.ibm.com \
--to=andrew.donnellan@au1.ibm.com \
--cc=clombard@linux.vnet.ibm.com \
--cc=fbarrat@linux.vnet.ibm.com \
--cc=felix@linux.vnet.ibm.com \
--cc=imunsie@au1.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ukrishn@linux.vnet.ibm.com \
--cc=vaibhav@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).