From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753528AbdF0URi (ORCPT ); Tue, 27 Jun 2017 16:17:38 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:39424 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753087AbdF0URa (ORCPT ); Tue, 27 Jun 2017 16:17:30 -0400 From: Christoph Hellwig To: linux-kernel@vger.kernel.org, m.szyprowski@samsung.com, robin.murphy@arm.com Subject: [PATCH 1/2] dma-coherent: remove the DMA_MEMORY_INCLUDES_CHILDREN flag Date: Tue, 27 Jun 2017 13:17:26 -0700 Message-Id: <20170627201727.9008-2-hch@lst.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170627201727.9008-1-hch@lst.de> References: <20170627201727.9008-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This flag was never implemented or used. Signed-off-by: Christoph Hellwig --- Documentation/DMA-API.txt | 4 ---- drivers/base/dma-coherent.c | 2 -- drivers/char/virtio_console.c | 3 --- include/linux/dma-mapping.h | 3 +-- 4 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt index 6b20128fab8a..03072bc7ff74 100644 --- a/Documentation/DMA-API.txt +++ b/Documentation/DMA-API.txt @@ -524,10 +524,6 @@ dma_alloc_coherent() be addressable using read()/write()/memcpy_toio() etc. 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. diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 2ae24c28e70c..e70e33d5c902 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c @@ -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; } diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index ad843eb02ae7..48e86ce9fac8 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -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; diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 843ab866e0f4..fb66fe98e61d 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -685,8 +685,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, -- 2.11.0