Linux s390 Architecture development
 help / color / mirror / Atom feed
* [PATCH] s390/mm: Export set_memory_encrypted and set_memory_decrypted
@ 2026-05-22 23:06 T.J. Mercier
  2026-05-23 16:01 ` Heiko Carstens
  0 siblings, 1 reply; 2+ messages in thread
From: T.J. Mercier @ 2026-05-22 23:06 UTC (permalink / raw)
  To: agordeev, gerald.schaefer, linux-s390, mripard, sumit.semwal
  Cc: linux-kernel, 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:

>> 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")
Signed-off-by: T.J. Mercier <tjmercier@google.com>
---
 arch/s390/mm/init.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index 36bd9530db52..8244b57da31c 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -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)
-- 
2.54.0.746.g67dd491aae-goog


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

* Re: [PATCH] s390/mm: Export set_memory_encrypted and set_memory_decrypted
  2026-05-22 23:06 [PATCH] s390/mm: Export set_memory_encrypted and set_memory_decrypted T.J. Mercier
@ 2026-05-23 16:01 ` Heiko Carstens
  0 siblings, 0 replies; 2+ messages in thread
From: Heiko Carstens @ 2026-05-23 16:01 UTC (permalink / raw)
  To: T.J. Mercier
  Cc: agordeev, gerald.schaefer, linux-s390, mripard, sumit.semwal,
	linux-kernel

On Fri, May 22, 2026 at 04:06:05PM -0700, T.J. Mercier wrote:
> 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:
> 
> >> 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")
> Signed-off-by: T.J. Mercier <tjmercier@google.com>
> ---
>  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:

Acked-by: Heiko Carstens <hca@linux.ibm.com>

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

end of thread, other threads:[~2026-05-23 16:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-22 23:06 [PATCH] s390/mm: Export set_memory_encrypted and set_memory_decrypted T.J. Mercier
2026-05-23 16:01 ` Heiko Carstens

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