···600601One or both of these flags must be present.602603-- DMA_MEMORY_INCLUDES_CHILDREN - make the declared memory be allocated by604- dma_alloc_coherent of any child devices of this one (for memory residing605- on a bridge).606-607- DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions.608 Do not allow dma_alloc_coherent() to fall back to system memory when609 it's out of memory in the declared region.
···600601One or both of these flags must be present.6020000603- DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions.604 Do not allow dma_alloc_coherent() to fall back to system memory when605 it's out of memory in the declared region.
-2
drivers/base/dma-coherent.c
···109 return -EBUSY;110111 dev->dma_mem = mem;112- /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */113-114 return 0;115}116
···451 * device is created by remoteproc, the DMA memory is452 * associated with the grandparent device:453 * vdev => rproc => platform-dev.454- * The code here would have been less quirky if455- * DMA_MEMORY_INCLUDES_CHILDREN had been supported456- * in dma-coherent.c457 */458 if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent)459 goto free_buf;
···451 * device is created by remoteproc, the DMA memory is452 * associated with the grandparent device:453 * vdev => rproc => platform-dev.000454 */455 if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent)456 goto free_buf;
+1-2
include/linux/dma-mapping.h
···696/* flags for the coherent memory api */697#define DMA_MEMORY_MAP 0x01698#define DMA_MEMORY_IO 0x02699-#define DMA_MEMORY_INCLUDES_CHILDREN 0x04700-#define DMA_MEMORY_EXCLUSIVE 0x08701702#ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT703int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
···696/* flags for the coherent memory api */697#define DMA_MEMORY_MAP 0x01698#define DMA_MEMORY_IO 0x02699+#define DMA_MEMORY_EXCLUSIVE 0x040700701#ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT702int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,