On 7/9/26 07:56, Marek Szyprowski wrote: > On 08.07.2026 10:35, David Hildenbrand (Arm) wrote: >> On 7/7/26 12:02, Marek Szyprowski wrote: >>> >>> Well, the technical reason for not creating cma regions dynamically at >>> runtime is that on some architectures (like 32bit ARM) the early fixup >>> for the region is needed to make it functional for DMA. >> Can you point me at the code that does that? Thanks! > Check dma_contiguous_early_fixup() and dma_contiguous_remap() inĀ > arch/arm/mm/dma-mapping.c. Those functions ensures that the CPU mappings for > the CMA reserved region in linear map are remapped with 4k pages instead > of the 1M sections, so later, it will beĀ possible to alter the mappings and > change them to coherent when needed (altering 1M sections is not possible, > because each process has it's own level-1 array even for the kernel linear > mapping). >
Thanks! > > > However, in the use case in this patchset the reserved region is only shared > with buddy allocator by using the CMA infrastructure, not registered to the > regular DMA-mapping API, so it would work fine. Yes, exactly. > I'm not convinced that this > is the right API to use for this though. If it's supposed to be special DMA memory, then indeed, it would be bypassing the DMA layer. -- Cheers, David
