Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag

This flag was never implemented or used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>

+1 -11
-4
Documentation/DMA-API.txt
··· 600 600 601 601 One or both of these flags must be present. 602 602 603 - - DMA_MEMORY_INCLUDES_CHILDREN - make the declared memory be allocated by 604 - dma_alloc_coherent of any child devices of this one (for memory residing 605 - on a bridge). 606 - 607 603 - DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions. 608 604 Do not allow dma_alloc_coherent() to fall back to system memory when 609 605 it's out of memory in the declared region.
-2
drivers/base/dma-coherent.c
··· 109 109 return -EBUSY; 110 110 111 111 dev->dma_mem = mem; 112 - /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */ 113 - 114 112 return 0; 115 113 } 116 114
-3
drivers/char/virtio_console.c
··· 451 451 * device is created by remoteproc, the DMA memory is 452 452 * associated with the grandparent device: 453 453 * vdev => rproc => platform-dev. 454 - * The code here would have been less quirky if 455 - * DMA_MEMORY_INCLUDES_CHILDREN had been supported 456 - * in dma-coherent.c 457 454 */ 458 455 if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent) 459 456 goto free_buf;
+1 -2
include/linux/dma-mapping.h
··· 696 696 /* flags for the coherent memory api */ 697 697 #define DMA_MEMORY_MAP 0x01 698 698 #define DMA_MEMORY_IO 0x02 699 - #define DMA_MEMORY_INCLUDES_CHILDREN 0x04 700 - #define DMA_MEMORY_EXCLUSIVE 0x08 699 + #define DMA_MEMORY_EXCLUSIVE 0x04 701 700 702 701 #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT 703 702 int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,