On Tue, 20 Jul 2010 18:12:39 -0600 Jonathan Corbet <corbet@xxxxxxx> wrote: > One other thing occurred to me as I was thinking about this... > > > + There are four calls provided by the CMA framework to devices. To > > + allocate a chunk of memory cma_alloc() function needs to be used: > > + > > + unsigned long cma_alloc(const struct device *dev, > > + const char *kind, > > + unsigned long size, > > + unsigned long alignment); > > The purpose behind this interface, I believe, is pretty much always > going to be to allocate memory for DMA buffers. Given that, might it > make more sense to integrate the API with the current DMA mapping > API? IMO, having separate APIs for allocating memory and doing DMA mapping is much better. The DMA API covers the latter well. We could extend the current API to allocate memory or create new one similar to the current. I don't see any benefit of a new abstraction that does both magically. About the framework, it looks too complicated than we actually need (the command line stuff looks insane). Why can't we have something simpler, like using memblock to reserve contiguous memory at boot and using kinda mempool to share such memory between devices? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>