* [PATCH] cxl: add option to enable -DDEBUG
@ 2016-07-18 8:17 Andrew Donnellan
2016-07-18 8:19 ` Ian Munsie
2016-07-18 10:49 ` Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: Andrew Donnellan @ 2016-07-18 8:17 UTC (permalink / raw)
To: linuxppc-dev; +Cc: imunsie, ukrishn, fbarrat, vaibhav, clombard, felix
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: add option to enable -DDEBUG
2016-07-18 8:17 [PATCH] cxl: add option to enable -DDEBUG Andrew Donnellan
@ 2016-07-18 8:19 ` Ian Munsie
2016-07-18 10:49 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Ian Munsie @ 2016-07-18 8:19 UTC (permalink / raw)
To: andrew.donnellan
Cc: linuxppc-dev, ukrishn, fbarrat, Vaibhav Jain, clombard,
Philippe Bergheaud
Acked-by: Ian Munsie <imunsie@au1.ibm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: add option to enable -DDEBUG
2016-07-18 8:17 [PATCH] cxl: add option to enable -DDEBUG Andrew Donnellan
2016-07-18 8:19 ` Ian Munsie
@ 2016-07-18 10:49 ` Michael Ellerman
2016-07-18 13:54 ` Uma Krishnan
1 sibling, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2016-07-18 10:49 UTC (permalink / raw)
To: Andrew Donnellan, linuxppc-dev
Cc: clombard, vaibhav, fbarrat, ukrishn, imunsie, felix
Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
> 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.
Another option is to use DYNAMIC_DEBUG. If you turn that on the
dev_dbg()'s can be enabled at runtime, and you could en masse or
selectively convert the pr_devel()s to pr_debug() to get the same
result.
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cxl: add option to enable -DDEBUG
2016-07-18 10:49 ` Michael Ellerman
@ 2016-07-18 13:54 ` Uma Krishnan
0 siblings, 0 replies; 4+ messages in thread
From: Uma Krishnan @ 2016-07-18 13:54 UTC (permalink / raw)
To: Michael Ellerman, Andrew Donnellan, linuxppc-dev
Cc: clombard, vaibhav, fbarrat, imunsie, felix
On 7/18/2016 5:49 AM, Michael Ellerman wrote:
> Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:
>
>> 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.
>
> Another option is to use DYNAMIC_DEBUG. If you turn that on the
> dev_dbg()'s can be enabled at runtime, and you could en masse or
> selectively convert the pr_devel()s to pr_debug() to get the same
> result.
>
> cheers
>
Andrew, DYNAMIC_DEBUG would be more useful for us because it can be
enabled at runtime just like we do for cxlflash.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-18 13:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 8:17 [PATCH] cxl: add option to enable -DDEBUG Andrew Donnellan
2016-07-18 8:19 ` Ian Munsie
2016-07-18 10:49 ` Michael Ellerman
2016-07-18 13:54 ` Uma Krishnan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.