linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the dma-mapping tree
@ 2012-02-13  5:40 Stephen Rothwell
  2012-02-13  7:31 ` Kyungmin Park
  2012-02-13 15:05 ` Marek Szyprowski
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2012-02-13  5:40 UTC (permalink / raw)
  To: Marek Szyprowski, Kyungmin Park; +Cc: linux-next, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1222 bytes --]

Hi all,

After merging the dma-mapping tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

arch/powerpc/kernel/vio.c: In function 'vio_dma_iommu_alloc_coherent':
arch/powerpc/kernel/vio.c:500:21: error: 'struct dma_map_ops' has no member named 'alloc_coherent'
arch/powerpc/kernel/vio.c: In function 'vio_dma_iommu_free_coherent':
arch/powerpc/kernel/vio.c:514:15: error: 'struct dma_map_ops' has no member named 'free_coherent'
arch/powerpc/kernel/vio.c: At top level:
arch/powerpc/kernel/vio.c:615:2: error: unknown field 'alloc_coherent' specified in initializer
arch/powerpc/kernel/vio.c:615:2: error: initialization from incompatible pointer type [-Werror]
arch/powerpc/kernel/vio.c:615:2: error: (near initialization for 'vio_dma_mapping_ops.alloc') [-Werror]
arch/powerpc/kernel/vio.c:616:2: error: unknown field 'free_coherent' specified in initializer
arch/powerpc/kernel/vio.c:616:2: error: initialization from incompatible pointer type [-Werror]
arch/powerpc/kernel/vio.c:616:2: error: (near initialization for 'vio_dma_mapping_ops.free') [-Werror]

I have dropped the dma-mapping tree for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread
* linux-next: build failure after merge of the dma-mapping tree
@ 2020-11-27  6:58 Stephen Rothwell
  2020-11-27  9:21 ` Christoph Hellwig
  2020-11-27  9:33 ` Christoph Hellwig
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2020-11-27  6:58 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Alexey Kardashevskiy, Michael Ellerman,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3133 bytes --]

Hi all,

After merging the dma-mapping tree, today's linux-next build (powerpc64
allnoconfig) failed like this:

In file included from include/linux/dma-direct.h:10,
                 from arch/powerpc/kernel/dma-iommu.c:9:
include/linux/dma-map-ops.h:328:41: error: expected identifier or '(' before numeric constant
  328 | #define arch_dma_map_page_direct(d, a) (0)
      |                                         ^
arch/powerpc/kernel/dma-iommu.c:16:6: note: in expansion of macro 'arch_dma_map_page_direct'
   16 | bool arch_dma_map_page_direct(struct device *dev, phys_addr_t addr)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-map-ops.h:329:43: error: expected identifier or '(' before numeric constant
  329 | #define arch_dma_unmap_page_direct(d, a) (0)
      |                                           ^
arch/powerpc/kernel/dma-iommu.c:26:6: note: in expansion of macro 'arch_dma_unmap_page_direct'
   26 | bool arch_dma_unmap_page_direct(struct device *dev, dma_addr_t dma_handle)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-map-ops.h:330:42: error: expected identifier or '(' before numeric constant
  330 | #define arch_dma_map_sg_direct(d, s, n) (0)
      |                                          ^
arch/powerpc/kernel/dma-iommu.c:34:6: note: in expansion of macro 'arch_dma_map_sg_direct'
   34 | bool arch_dma_map_sg_direct(struct device *dev, struct scatterlist *sg,
      |      ^~~~~~~~~~~~~~~~~~~~~~
include/linux/dma-map-ops.h:331:44: error: expected identifier or '(' before numeric constant
  331 | #define arch_dma_unmap_sg_direct(d, s, n) (0)
      |                                            ^
arch/powerpc/kernel/dma-iommu.c:51:6: note: in expansion of macro 'arch_dma_unmap_sg_direct'
   51 | bool arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg,
      |      ^~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

  4e52b96ac85c ("powerpc/dma: Fallback to dma_ops when persistent memory present")

I have applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 27 Nov 2020 17:49:28 +1100
Subject: [PATCH] powerpc/dma: fix for "powerpc/dma: Fallback to dma_ops when
 persistent memory present"

Fixes: 4e52b96ac85c ("powerpc/dma: Fallback to dma_ops when persistent memory present")
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 arch/powerpc/kernel/dma-iommu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index c724548ca295..6364311eb6e9 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -10,6 +10,8 @@
 #include <linux/pci.h>
 #include <asm/iommu.h>
 
+#ifdef CONFIG_ARCH_HAS_DMA_MAP_DIRECT
+
 #define can_map_direct(dev, addr) \
 	((dev)->bus_dma_limit >= phys_to_dma((dev), (addr)))
 
@@ -64,6 +66,7 @@ bool arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg,
 
 	return true;
 }
+#endif /* CONFIG_ARCH_HAS_DMA_MAP_DIRECT */
 
 /*
  * Generic iommu implementation
-- 
2.29.2

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-11-27  9:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13  5:40 linux-next: build failure after merge of the dma-mapping tree Stephen Rothwell
2012-02-13  7:31 ` Kyungmin Park
2012-02-13 15:05 ` Marek Szyprowski
2020-11-27  6:58 Stephen Rothwell
2020-11-27  9:21 ` Christoph Hellwig
2020-11-27  9:59   ` Stephen Rothwell
2020-11-27  9:33 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).