Re: [PATCH] cxl: Add CONFIG_CXL_DEBUG to drivers/cxl

From: Ira Weiny
Date: Thu Jun 26 2025 - 10:11:02 EST


Yuquan Wang wrote:
> CONFIG_CXL_DEBUG=y adds -DDEBUG to CFLAGS, which enables pr_debug()
> and dev_dbg(). Users can use this config to open all cxl debug
> messages.

There is no need for this.

Dynamic debugging can be turned on at run time.[1]

For example here is what run_qemu[2] adds to the cmdline to debug cxl with
cxl-test.

cxl_acpi.dyndbg=+fplm cxl_pci.dyndbg=+fplm cxl_core.dyndbg=+fplm
cxl_mem.dyndbg=+fplm cxl_pmem.dyndbg=+fplm cxl_port.dyndbg=+fplm
cxl_region.dyndbg=+fplm cxl_test.dyndbg=+fplm cxl_mock.dyndbg=+fplm
cxl_mock_mem.dyndbg=+fplm

Ira

[1] https://www.kernel.org/doc/html/v4.14/admin-guide/dynamic-debug-howto.html
[2] https://github.com/pmem/run_qemu

[snip]