Thread (22 messages) 22 messages, 4 authors, 2019-08-29

Re: [PATCH v2 1/2] dma-contiguous: Abstract dma_{alloc, free}_contiguous()

From: Nicolin Chen <nicoleotsuka@gmail.com>
Date: 2019-05-24 03:50:25
Also in: linux-iommu, lkml

On Thu, May 23, 2019 at 08:59:30PM -0600, dann frazier wrote:
quoted
quoted
diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c
index b2a87905846d..21f39a6cb04f 100644
--- a/kernel/dma/contiguous.c
+++ b/kernel/dma/contiguous.c
@@ -214,6 +214,54 @@ bool dma_release_from_contiguous(struct device *dev, struct page *pages,
        return cma_release(dev_get_cma_area(dev), pages, count);
 }
This breaks the build for me if CONFIG_DMA_CMA=n:

  LD [M]  fs/9p/9p.o
ld: fs/9p/vfs_inode.o: in function `dma_alloc_contiguous':
vfs_inode.c:(.text+0xa60): multiple definition of
`dma_alloc_contiguous'; fs/9p/vfs_super.o:vfs_super.c:(.text+0x500):
first defined here

Do the following insertions need to be under an #ifdef CONFIG_DMA_CMA ?
Ah, no - the problem is actually a missing "static inline" in the
!CONFIG_DMA_CMA version of dma_alloc_contiguous().
Yea, I saw it. Thanks for the testing and pointing it out.

Sending v3.....

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help