Skip to contentSkip to conversation

dax/hmem: build hmem device support as module if possible

PATCH Applied Arnd Bergmann 2 participants 2 messages Feb 14, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dax/hmem: build hmem device support as module if possible

From: Arnd Bergmann <[email protected]>

When device_hmem.o is enabled but dax itself is a loadable module, the dax_hmem support fails to link because Kbuild never compiles built-in code under drivers/dax:

ERROR: modpost: "walk_hmem_resources" [drivers/dax/hmem/dax_hmem.ko] undefined!

Make sure that drivers/dax is entered for compiling built-in code even with CONFIG_DAX=m.

Fixes 7dab174e2e27 ("dax/hmem: Move hmem device registration to dax_hmem.ko")
---
 drivers/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/Makefile +1 -1
index 148ccfc2b5fe..20b118dca999 100644
@@ -76,7 +76,7 @@ obj-$(CONFIG_FB_INTEL)          += video/fbdev/intelfb/
 obj-$(CONFIG_PARPORT)		+= parport/
 obj-y				+= base/ block/ misc/ mfd/ nfc/
 obj-$(CONFIG_LIBNVDIMM)		+= nvdimm/
-obj-$(CONFIG_DAX)		+= dax/
+obj-y				+= dax/
 obj-$(CONFIG_DMA_SHARED_BUFFER) += dma-buf/
 obj-$(CONFIG_NUBUS)		+= nubus/
 obj-y				+= cxl/
Signature · 1 line
2.39.1
Applied
#1 lore raw
Quoted 6 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

When device_hmem.o is enabled but dax itself is a loadable module, the dax_hmem support fails to link because Kbuild never compiles built-in code under drivers/dax:

Quoted 8 lines

ERROR: modpost: "walk_hmem_resources" [drivers/dax/hmem/dax_hmem.ko] undefined!

Make sure that drivers/dax is entered for compiling built-in code even with CONFIG_DAX=m.

Fixes 7dab174e2e27 ("dax/hmem: Move hmem device registration to dax_hmem.ko")

---

Thanks, applied.