But Russell's objection is a significant one. If we go with CMA as-is, we risk an API whose behavior changes across platforms. We can't have that, or the whole point of CMA (in my view) is lost. We may as well stick with the magic numbers in our code that we have now.
Unfortunately, CMA is at least two tangentially-related things at once: a command-line syntax for expressing large memory regions that the kernel shall avoid, and an implementation for allocations from those regions. Embedded developers are in critical need of both, but I for one would be pretty happy if we could just get the API in for now so that we could standardize what the solution would look like.
At least in the near term, I wouldn't care if the mainlined "CMA" API was just dma_alloc_coherent() under the hood. I am willing to accept severe caveats in its use so long as my drivers I am writing now stay reasonably source-compatible with the implementation of CMA as it improves over time.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds