Skip to contentSkip to conversation

s390/mm: Export set_memory_encrypted and set_memory_decrypted

PATCH In review T.J. Mercier 2 participants 2 messages May 22 – May 23

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/mm: Export set_memory_encrypted and set_memory_decrypted

After commit fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module") the system dma-buf heaps can be built as a module. The system_cc_shared heap uses set_memory_encrypted and set_memory_decrypted but those functions are not exported on s390. This results in a build error like:

Quoted 2 lines
Quoted 2 lines

ERROR: modpost: "set_memory_decrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
ERROR: modpost: "set_memory_encrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!

Export the functions so system_heap.ko can be built.

Fixes fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module")
---
 arch/s390/mm/init.c | 2 ++
 1 file changed, 2 insertions(+)
arch/s390/mm/init.c +2 -0
index 36bd9530db52..8244b57da31c 100644
@@ -124,6 +124,7 @@ int set_memory_encrypted(unsigned long vaddr, int numpages)
 	}
 	return 0;
 }
+EXPORT_SYMBOL_GPL(set_memory_encrypted);
 
 int set_memory_decrypted(unsigned long vaddr, int numpages)
 {
@@ -135,6 +136,7 @@ int set_memory_decrypted(unsigned long vaddr, int numpages)
 	}
 	return 0;
 }
+EXPORT_SYMBOL_GPL(set_memory_decrypted);
 
 /* are we a protected virtualization guest? */
 bool force_dma_unencrypted(struct device *dev)
Signature · 1 line
2.54.0.746.g67dd491aae-goog
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · T.J. Mercier

After commit fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module") the system dma-buf heaps can be built as a module. The system_cc_shared heap uses set_memory_encrypted and set_memory_decrypted but those functions are not exported on s390. This results in a build error like:

Quoted 2 lines
Quoted 2 lines

ERROR: modpost: "set_memory_decrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!
ERROR: modpost: "set_memory_encrypted" [drivers/dma-buf/heaps/system_heap.ko] undefined!

Quoted 7 lines

Export the functions so system_heap.ko can be built.

Fixes fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module")
---
 arch/s390/mm/init.c | 2 ++
 1 file changed, 2 insertions(+)

Fine with me, but this should go via drm-misc-next, since the commit which breaks this is currently only available in linux-next.

Sumit, I guess you will add this to your queue?

In any case: