dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag
authorChristoph Hellwig <hch@lst.de>
Fri, 25 Aug 2017 15:12:18 +0000 (17:12 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 1 Sep 2017 07:50:39 +0000 (09:50 +0200)
This flag was never implemented or used.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Documentation/DMA-API.txt
drivers/base/dma-coherent.c
drivers/char/virtio_console.c
include/linux/dma-mapping.h

index ef3a04fcad655f2efd9989f9b810314233c90bee..dddf52e768d6f6b6f7a1a00b317c1ce354e27fd5 100644 (file)
@@ -600,10 +600,6 @@ flags can be ORed together and are:
 
 One or both of these flags must be present.
 
-- DMA_MEMORY_INCLUDES_CHILDREN - make the declared memory be allocated by
-  dma_alloc_coherent of any child devices of this one (for memory residing
-  on a bridge).
-
 - DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions.
   Do not allow dma_alloc_coherent() to fall back to system memory when
   it's out of memory in the declared region.
index 1c152aed6b8265409a0ab2a677ce4bd0a99d62a9..6f6dc4d41788bcb827fdf310aebc96711f477146 100644 (file)
@@ -109,8 +109,6 @@ static int dma_assign_coherent_memory(struct device *dev,
                return -EBUSY;
 
        dev->dma_mem = mem;
-       /* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
-
        return 0;
 }
 
index ad843eb02ae7be21ae7470c6cc840a30a3f6e272..48e86ce9fac80ff335f34411983a33344c57f000 100644 (file)
@@ -451,9 +451,6 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
                 * device is created by remoteproc, the DMA memory is
                 * associated with the grandparent device:
                 * vdev => rproc => platform-dev.
-                * The code here would have been less quirky if
-                * DMA_MEMORY_INCLUDES_CHILDREN had been supported
-                * in dma-coherent.c
                 */
                if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent)
                        goto free_buf;
index 4c98cc96971f0e1c057695212ef29de78493add1..abf369b11f5467b9bbe4782594b792099967ba88 100644 (file)
@@ -696,8 +696,7 @@ static inline int dma_get_cache_alignment(void)
 /* flags for the coherent memory api */
 #define        DMA_MEMORY_MAP                  0x01
 #define DMA_MEMORY_IO                  0x02
-#define DMA_MEMORY_INCLUDES_CHILDREN   0x04
-#define DMA_MEMORY_EXCLUSIVE           0x08
+#define DMA_MEMORY_EXCLUSIVE           0x04
 
 #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT
 int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,