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 601 One or both of these flags must be present. 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 - DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions. 608 Do not allow dma_alloc_coherent() to fall back to system memory when 609 it's out of memory in the declared region.
··· 600 601 One or both of these flags must be present. 602 603 - DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions. 604 Do not allow dma_alloc_coherent() to fall back to system memory when 605 it's out of memory in the declared region.
-2
drivers/base/dma-coherent.c
··· 109 return -EBUSY; 110 111 dev->dma_mem = mem; 112 - /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */ 113 - 114 return 0; 115 } 116
··· 109 return -EBUSY; 110 111 dev->dma_mem = mem; 112 return 0; 113 } 114
-3
drivers/char/virtio_console.c
··· 451 * device is created by remoteproc, the DMA memory is 452 * associated with the grandparent device: 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 */ 458 if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent) 459 goto free_buf;
··· 451 * device is created by remoteproc, the DMA memory is 452 * associated with the grandparent device: 453 * vdev => rproc => platform-dev. 454 */ 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 0x01 698 #define DMA_MEMORY_IO 0x02 699 - #define DMA_MEMORY_INCLUDES_CHILDREN 0x04 700 - #define DMA_MEMORY_EXCLUSIVE 0x08 701 702 #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT 703 int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
··· 696 /* flags for the coherent memory api */ 697 #define DMA_MEMORY_MAP 0x01 698 #define DMA_MEMORY_IO 0x02 699 + #define DMA_MEMORY_EXCLUSIVE 0x04 700 701 #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT 702 int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,