Re: [PATCH] dma-buf: move system_cc_shared heap under separate Kconfig
From: Sumit Semwal
Date: Thu Jun 11 2026 - 10:46:20 EST
Hi Jiri,
On Thu, 11 Jun 2026 at 15:51, Jiri Pirko <jiri@xxxxxxxxxxx> wrote:
>
> Wed, Jun 10, 2026 at 04:23:29PM +0200, sumit.semwal@xxxxxxxxxx wrote:
> >From: Arnd Bergmann <arnd@xxxxxxxx>
> >
> >While system heap and system_cc_shared heap share a lot of code
> >and hence the same source file, their users have different needs.
> >
> >system heap users need it to be a loadable module, while
> >system_cc_shared heap users don't.
> >
> >Building as a loadable module breaks system_cc_shared heap on
> >powerpc and s390 due to un-exported set_memory_encrypted /
> >set_memory_decrypted functions.
> >
> >Fix these by reorganising code to put the system_cc_shared heap
> >under a new Kconfig symbol, which allows either building both
> >into the kernel, or leave encryption up to the consumers of the
> >system heap.
> >
> >Fixes: fd55edff8a0a ("dma-buf: heaps: system: Turn the heap into a module")
> >Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> >Signed-off-by: Sumit Semwal <sumit.semwal@xxxxxxxxxx>
> >---
> > drivers/dma-buf/heaps/Kconfig | 8 ++++++++
> > drivers/dma-buf/heaps/system_heap.c | 16 ++++++++++------
> > 2 files changed, 18 insertions(+), 6 deletions(-)
> >
> >diff --git a/drivers/dma-buf/heaps/Kconfig b/drivers/dma-buf/heaps/Kconfig
> >index e273fb18feca..a39decdcf067 100644
> >--- a/drivers/dma-buf/heaps/Kconfig
> >+++ b/drivers/dma-buf/heaps/Kconfig
> >@@ -5,6 +5,14 @@ config DMABUF_HEAPS_SYSTEM
> > Choose this option to enable the system dmabuf heap. The system heap
> > is backed by pages from the buddy allocator. If in doubt, say Y.
> >
> >+config DMABUF_HEAPS_CC_SYSTEM
>
> Nit: "DMABUF_HEAPS_SYSTEM_CC_SHARED" to be consistent with the heap
> name?
>
> With or without it:
> Reviewed-by: Jiri Pirko <jiri@xxxxxxxxxx>
>
Thanks for catching this; I'll fix this while pushing to
drm-misc-next-fixes in a few minutes.
Best,
Sumit.