linux/Documentation/userspace-api
Maxime Ripard 4f5f8baf73 dma-buf: heaps: cma: Create CMA heap for each CMA reserved region
Aside from the main CMA region, it can be useful to allow userspace to
allocate from the other CMA reserved regions.

Indeed, those regions can have specific properties that can be useful to
a specific us-case.

For example, one of them platform I've been with has ECC enabled on the
entire memory but for a specific region. Using that region to allocate
framebuffers can be particular beneficial because enabling the ECC has a
performance and memory footprint cost.

Thus, exposing these regions as heaps user-space can allocate from and
import wherever needed allows to cover that use-case.

For now, only shared-dma-pools regions with the reusable property (ie,
backed by CMA) are supported, but eventually we'll want to support other
DMA pools types.

Since we collected all the CMA regions created during boot, we can
simply iterate over all of them to create the heaps.

This has a weird interaction with the recent work on the CMA name, in
particular the backward compatibility code created by commit
854acbe75f ("dma-buf: heaps: Give default CMA heap a fixed name").

Indeed, the old name was either 'reserved', or the name of the
reserved-memory region device tree node if the linux,cma-default
property was set.

In both these cases, we have now collected this region during boot, and
we're using the same name. So we're now largely redundant with the
code to handle backward compatibility code, and we can thus remove it
and the associated Kconfig option.

Reviewed-by: T.J. Mercier <tjmercier@google.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
   [sumits: rebased the doc to latest]
Link: https://lore.kernel.org/r/20251013-dma-buf-ecc-heap-v8-5-04ce150ea3d9@kernel.org
2025-10-18 21:31:22 +05:30
..
accelerators Documentation: ocxl.rst: Update consortium site 2025-03-12 16:26:45 -06:00
ebpf docs/bpf: Add bpf() syscall command reference 2021-03-04 18:39:46 -08:00
fwctl docs: Improve grammar in Userspace API/fwctl 2025-06-09 15:11:46 -06:00
gpio Documentation: gpio: Reconfiguration with unset direction (uAPI v2) 2024-07-01 09:38:45 +02:00
ioctl powerpc/pseries: Define papr-hvpipe ioctl 2025-09-15 13:38:39 +05:30
media It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
netlink docs: uapi: netlink: update netlink specs link 2025-08-12 07:47:30 +02:00
check_exec.rst security: Add EXEC_RESTRICT_FILE and EXEC_DENY_INTERACTIVE securebits 2024-12-18 17:00:29 -08:00
dcdbas.rst Documentation: move driver-api/dcdbas to userspace-api/ 2024-01-03 14:17:40 -07:00
dma-buf-alloc-exchange.rst doc: uapi: Add document describing dma-buf semantics 2023-08-21 18:20:05 +02:00
dma-buf-heaps.rst dma-buf: heaps: cma: Create CMA heap for each CMA reserved region 2025-10-18 21:31:22 +05:30
ELF.rst ELF: document some de-facto PT_* ABI quirks 2023-04-20 17:53:38 -06:00
futex2.rst futex2: Documentation: Document sys_futex_waitv() uAPI 2021-10-07 13:51:13 +02:00
index.rst fwctl first pull request 2025-03-29 10:45:20 -07:00
iommufd.rst iommufd: Fix spelling errors in iommufd.rst 2025-08-18 11:15:06 -03:00
isapnp.rst Documentation: move driver-api/isapnp to userspace-api/ 2024-01-03 14:17:39 -07:00
landlock.rst landlock: Add audit documentation 2025-03-26 13:59:49 +01:00
lsm.rst LSM: Create lsm_list_modules system call 2023-11-12 22:54:42 -05:00
mfd_noexec.rst mm/memfd: add documentation for MFD_NOEXEC_SEAL MFD_EXEC 2024-06-15 10:43:07 -07:00
mseal.rst LoongArch: Enable ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS 2025-05-30 21:45:42 +08:00
no_new_privs.rst doc: ReSTify no_new_privs.txt 2017-05-18 10:30:09 -06:00
ntsync.rst docs: ntsync: Add documentation for the ntsync uAPI. 2025-01-08 13:18:12 +01:00
perf_ring_buffer.rst coresight: docs: Remove target sink from examples 2025-03-11 14:55:57 +00:00
seccomp_filter.rst Documentation: userspace-api: correct spelling 2023-02-02 11:07:18 -07:00
spec_ctrl.rst Documentation: Add L1D flushing Documentation 2021-07-28 11:42:25 +02:00
sysfs-platform_profile.rst docs: Fix typos, improve grammar in Userspace API 2025-06-09 15:13:33 -06:00
tee.rst Documentation: Destage TEE subsystem documentation 2023-12-08 15:45:10 -07:00
unshare.rst doc-rst: fix inline emphasis in unshare.rst 2017-05-18 10:23:10 -06:00
vduse.rst VDUSE: fix documentation underline warning 2021-10-13 08:42:07 -04:00