Skip to contentSkip to conversation

ia64: export memory_add_physaddr_to_nid to fix cxl build error

PATCH In review Randy Dunlap 2 participants 2 messages Sep 11, 2022 – Sep 12, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ia64: export memory_add_physaddr_to_nid to fix cxl build error

cxl_pmem.ko uses memory_add_physaddr_to_nid() but ia64 does not export it, so this causes a build error:

ERROR: modpost: "memory_add_physaddr_to_nid" [drivers/cxl/cxl_pmem.ko] undefined!

Fix this by exporting that function.

Fixes 8c2676a5870a ("hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup")
Cc Dan Williams <[email protected]>
Cc Ben Widawsky <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Keith Mannthey <[email protected]>
Cc Andrew Morton <[email protected]>

---
Arnd, can you take this in your one-off fixes arch tree, or would you prefer for Andrew to take it?

 arch/ia64/mm/numa.c |    1 +
 1 file changed, 1 insertion(+)
arch/ia64/mm/numa.c +1 -0
@@ -75,5 +75,6 @@ int memory_add_physaddr_to_nid(u64 addr)
 		return 0;
 	return nid;
 }
+EXPORT_SYMBOL(memory_add_physaddr_to_nid);
 #endif
 #endif
#1 lore raw
Quoted 19 lines · Randy Dunlap

cxl_pmem.ko uses memory_add_physaddr_to_nid() but ia64 does not export it, so this causes a build error:

ERROR: modpost: "memory_add_physaddr_to_nid" [drivers/cxl/cxl_pmem.ko] undefined!

Fix this by exporting that function.

Fixes 8c2676a5870a ("hot-add-mem x86_64: memory_add_physaddr_to_nid

node fixup")

Cc Dan Williams <[email protected]>
Cc Ben Widawsky <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Arnd Bergmann <[email protected]>
Cc Keith Mannthey <[email protected]>
Cc Andrew Morton <[email protected]>
Quoted 3 lines

---
Arnd, can you take this in your one-off fixes arch tree, or would you prefer for Andrew to take it?

I've applied it to the asm-generic tree for 6.1 now, as I don't expect any other bugfixes for 6.0 to go through that tree. It's clearly a bugfix, but since the original commit you cite was from 2006, I assume it can wait a little longer.

Arnd