Linux CXL
 help / color / mirror / Atom feed
* [PATCH] dax: clx: add CXL_REGION dependency
@ 2023-02-14 10:30 Arnd Bergmann
  2023-02-14 16:38 ` Dan Williams
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2023-02-14 10:30 UTC (permalink / raw)
  To: Dan Williams, Vishal Verma, Dave Jiang, Jonathan Cameron
  Cc: Arnd Bergmann, Gregory Price, John Ogness, Paul E. McKenney,
	nvdimm, linux-cxl, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

There is already a dependency on CXL_REGION, which depends on CXL_BUS,
but since CXL_REGION is a 'bool' symbol, it's possible to configure
DAX as built-in even though CXL itself is a loadable module:

x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_probe':
cxl.c:(.text+0xb): undefined reference to `to_cxl_dax_region'
x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_init':
cxl.c:(.init.text+0x10): undefined reference to `__cxl_driver_register'
x86_64-linux-ld: drivers/dax/cxl.o: in function `cxl_dax_region_driver_exit':
cxl.c:(.exit.text+0x9): undefined reference to `cxl_driver_unregister'

Prevent this with another depndency on the tristate symbol.

Fixes: 09d09e04d2fc ("cxl/dax: Create dax devices for CXL RAM regions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/dax/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig
index 8c67a24592e3..a88744244149 100644
--- a/drivers/dax/Kconfig
+++ b/drivers/dax/Kconfig
@@ -46,7 +46,7 @@ config DEV_DAX_HMEM
 
 config DEV_DAX_CXL
 	tristate "CXL DAX: direct access to CXL RAM regions"
-	depends on CXL_REGION && DEV_DAX
+	depends on CXL_BUS && CXL_REGION && DEV_DAX
 	default CXL_REGION && DEV_DAX
 	help
 	  CXL RAM regions are either mapped by platform-firmware
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-02-14 16:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-14 10:30 [PATCH] dax: clx: add CXL_REGION dependency Arnd Bergmann
2023-02-14 16:38 ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox