linux/Documentation
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
History 2025-10-18 21:31:22 +05:30
..
ABI VFIO updates for v6.18-rc1 part 2 2025-10-08 11:22:27 -07:00
accel Documentation: accel: amdxdna: Update compiler information 2025-08-21 08:25:31 -07:00
accounting docs: update delaytop documentation for new interactive features 2025-09-13 17:32:56 -07:00
admin-guide - Remove a bunch of asm implementing condition flags testing in KVM's 2025-10-11 11:19:16 -07:00
arch - Make TDX and kexec work together 2025-10-04 10:01:30 -07:00
block Documentation: ublk: Separate UBLK_F_AUTO_BUF_REG fallback behavior sublists 2025-06-13 09:25:42 -06:00
bpf bpf: disable and remove registers chain based liveness 2025-09-19 09:27:23 -07:00
cdrom cdrom: Call cdrom_mrw_exit from cdrom_release function 2025-07-22 19:10:17 -06:00
core-api dma-mapping updates for Linux 6.18: 2025-10-03 17:41:12 -07:00
cpu-freq cpufreq: Drop unused symbol CPUFREQ_ETERNAL 2025-10-01 13:57:22 +02:00
crypto crypto: doc - Add explicit title heading to API docs 2025-09-28 11:54:48 +08:00
dev-tools It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
devicetree dt-bindings: display: rockchip,dw-mipi-dsi: Document RK3368 DSI 2025-10-14 14:12:23 +02:00
doc-guide docs: sphinx: add a file with the requirements for lowest version 2025-06-25 12:22:48 -06:00
driver-api pci-v6.18-changes 2025-10-06 10:41:03 -07:00
edac cxl/edac: Add CXL memory device soft PPR control feature 2025-05-23 13:25:06 -07:00
fault-injection docs: fault-injection: drop reference to md-faulty 2025-07-24 08:31:46 -06:00
fb fbdev fixes & enhancements for 6.18-rc1: 2025-10-10 09:36:23 -07:00
features OpenRISC updates for 6.18 2025-10-05 10:02:54 -07:00
filesystems VFIO updates for v6.18-rc1 2025-10-04 08:24:54 -07:00
firmware-guide Merge branch 'acpi-misc' 2025-07-22 17:12:57 +02:00
firmware_class firmware: revamp firmware documentation 2017-01-11 09:42:59 +01:00
fpga Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
gpu Merge drm/drm-next into drm-misc-next 2025-10-13 09:19:19 +02:00
hid HID: intel-thc-hid: Separate max input size control conditional list 2025-06-20 08:55:52 +02:00
hwmon hwmon: (cros_ec) register fans into thermal framework cooling devices 2025-09-25 08:08:14 -07:00
i2c i2c: i801: Add support for Intel Wildcat Lake-U 2025-09-28 00:45:53 +02:00
iio docs: iio: add documentation for ade9000 driver 2025-09-13 14:20:44 +01:00
images docs: add SVG version of the Linux logo 2022-06-01 09:32:45 -06:00
infiniband docs: infiniband: document the UCAP API 2025-03-09 13:13:02 -04:00
input Input: add INPUT_PROP_HAPTIC_TOUCHPAD 2025-09-15 14:32:54 +02:00
isdn Documentation: isdn: correct spelling 2023-02-10 16:28:13 -08:00
kbuild Kbuild updates for 6.18 2025-10-01 20:58:51 -07:00
kernel-hacking docs/licensing: Clarify wording about "GPL" and "Proprietary" 2024-11-22 10:44:25 -07:00
leds LEDs for v6.16 2025-06-03 12:10:31 -07:00
litmus-tests Documentation/litmus-tests: Make cmpxchg() tests safe for klitmus 2024-05-06 14:29:21 -07:00
livepatch docs: livepatch: move text out of code block 2025-03-04 16:01:29 +01:00
locking Documentation: locking: Add local_lock_nested_bh() to locktypes 2025-08-21 12:52:20 -06:00
maintainer docs: maintainer: Fix ambiguous subheading formatting 2025-09-18 10:26:45 -06:00
mhi docs: Add documentation for MHI bus 2020-03-19 07:41:04 +01:00
misc-devices misc: amd-sbi: Add document for AMD SB IOCTL description 2025-05-21 14:44:41 +02:00
mm Only two patch series in this pull request: 2025-10-05 12:11:07 -07:00
netlabel docs: add some directories to the main documentation index 2019-07-15 11:03:03 -03:00
netlink Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
networking RDMA v6.18 merge window pull request 2025-10-03 18:35:22 -07:00
nvdimm nvdimm: fixes to maintainter-entry-profile 2020-05-25 10:19:19 -06:00
nvme docs: nvme: fix grammar in nvme-pci-endpoint-target.rst 2025-07-17 13:38:07 +02:00
PCI pci-v6.18-changes 2025-10-06 10:41:03 -07:00
pcmcia Documentation: use capitalization for chapters and acronyms 2023-05-16 12:49:31 -06:00
peci Docs/subsystem-apis: Remove '[The ]Linux' prefixes from titles of listed documents 2023-01-24 15:27:08 -07:00
power It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
process It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
RCU RCU pull request for v6.18 2025-10-04 11:28:45 -07:00
rust Documentation: rust: testing: add docs on the new KUnit #[test] tests 2025-05-27 20:09:59 +02:00
scheduler sched_ext: Changes for v6.17 2025-07-31 16:29:46 -07:00
scsi scsi: switch ->bios_param() to passing gendisk 2025-08-13 02:59:28 -04:00
security hardening updates for v6.17-rc1 2025-07-28 17:16:12 -07:00
sound ALSA: emu10k1: Fix typo in docs 2025-10-04 15:47:24 +02:00
sphinx docs: remove cdomain.py 2025-09-21 16:35:57 -06:00
sphinx-static docs: CSS: make cross-reference links more evident 2025-06-09 14:43:39 -06:00
spi spi: Enable controllers to extend the SPI protocol with MOSI idle configuration 2024-07-29 01:19:51 +01:00
staging It has been a relatively busy cycle in docsland, with changes all over: 2025-10-03 17:16:13 -07:00
sunrpc/xdr nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_* 2025-01-21 15:30:01 -05:00
target scsi: target: docs: Remove tcm_mod_builder.py 2023-06-28 22:01:32 -04:00
tee Documentation: tee: Add Qualcomm TEE driver 2025-09-15 17:34:06 +02:00
timers timers/Documentation: Cleanup delay/sleep documentation 2024-10-16 00:36:48 +02:00
tools tools/rtla: Add remaining support for osnoise actions 2025-09-27 04:53:48 -04:00
trace Documentation: trace: histogram: Convert ftrace docs cross-reference 2025-09-18 11:49:26 -06:00
translations More power management updates for 6.18-rc1 2025-10-07 09:39:51 -07:00
usb It has been a relatively busy cycle for docs, especially the build system: 2025-07-31 08:36:51 -07:00
userspace-api dma-buf: heaps: cma: Create CMA heap for each CMA reserved region 2025-10-18 21:31:22 +05:30
virt Generic: 2025-10-06 12:37:34 -07:00
w1 docs: w1: ds2482: fix typo in buses 2025-09-16 10:00:57 -06:00
watchdog watchdog: Delete the cpu5wdt driver 2024-11-05 10:04:39 +01:00
wmi platform/x86: Add lenovo-wmi-* driver Documentation 2025-07-03 10:54:24 +03:00
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
.renames.txt docs: add Documentation/.renames.txt 2025-09-09 13:37:16 -06:00
atomic_bitops.txt wait_on_bit: add an acquire memory barrier 2022-08-26 09:30:25 -07:00
atomic_t.txt Documentation/atomic_t: Emphasize that failed atomic operations give no ordering 2024-05-06 14:29:04 -07:00
Changes docs: add back 'Documentation/Changes' file (as symlink) 2016-12-14 16:30:12 -08:00
CodingStyle doc: re-add CodingStyle and SubmittingPatches 2016-10-24 08:12:35 -02:00
conf.py docs: conf.py: drop xindy rule 2025-08-29 16:45:09 -06:00
docutils.conf doc-rst: Add missing newline at end of file 2019-06-20 14:16:56 -06:00
index.rst docs: fix typo in firmware-related section 2025-05-07 00:53:22 -06:00
Kconfig Documentation: Avoid duplicate Kconfig inclusion 2023-01-19 13:56:34 -07:00
Makefile docs: add tools/docs/gen-redirects.py 2025-09-09 13:37:16 -06:00
memory-barriers.txt docs/memory-barriers.txt: Add wait_event_cmd() and wait_event_exclusive_cmd() 2025-07-09 10:08:14 -07:00
SubmittingPatches doc: re-add CodingStyle and SubmittingPatches 2016-10-24 08:12:35 -02:00
subsystem-apis.rst Documentation/EDAC: Fix warning document isn't included in any toctree 2025-04-01 22:26:47 +02:00