Skip to content

Commit b32dbc1

Browse files
author
Christoph Hellwig
committed
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 parent 7232888 commit b32dbc1

4 files changed

Lines changed: 1 addition & 11 deletions

File tree

‎Documentation/DMA-API.txt‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -600,10 +600,6 @@ flags can be ORed together and are:
600600

601601
One or both of these flags must be present.
602602

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-
607603
- DMA_MEMORY_EXCLUSIVE - only allocate memory from the declared regions.
608604
Do not allow dma_alloc_coherent() to fall back to system memory when
609605
it's out of memory in the declared region.

‎drivers/base/dma-coherent.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,6 @@ static int dma_assign_coherent_memory(struct device *dev,
109109
return -EBUSY;
110110

111111
dev->dma_mem = mem;
112-
/* FIXME: this routine just ignores DMA_MEMORY_INCLUDES_CHILDREN */
113-
114112
return 0;
115113
}
116114

‎drivers/char/virtio_console.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,6 @@ static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
451451
* device is created by remoteproc, the DMA memory is
452452
* associated with the grandparent device:
453453
* 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
457454
*/
458455
if (!vq->vdev->dev.parent || !vq->vdev->dev.parent->parent)
459456
goto free_buf;

‎include/linux/dma-mapping.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,8 +696,7 @@ static inline int dma_get_cache_alignment(void)
696696
/* flags for the coherent memory api */
697697
#define DMA_MEMORY_MAP 0x01
698698
#define DMA_MEMORY_IO 0x02
699-
#define DMA_MEMORY_INCLUDES_CHILDREN 0x04
700-
#define DMA_MEMORY_EXCLUSIVE 0x08
699+
#define DMA_MEMORY_EXCLUSIVE 0x04
701700

702701
#ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT
703702
int dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,

0 commit comments

Comments
 (0)