linux-next: build failure after merge of the dma-mapping tree
Subsystems (2)
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 <[email protected]>
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"
--- arch/powerpc/kernel/dma-iommu.c | 3 +++ 1 file changed, 3 insertions(+)
arch/powerpc/kernel/dma-iommu.c +3 -0
@@ -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
Signature · 5 lines
2.29.2 -- Cheers, Stephen Rothwell
Quoted 4 lines · Stephen Rothwell
Hi all,
After merging the dma-mapping tree, today's linux-next build (powerpc64 allnoconfig) failed like this:
I'm looking into fixing this now, but how do you generate a powerpc64 allnoconfig? My attempts so far either create a ppc32 one or fail entirely.
Hi Christoph,
Quoted 9 lines · On Fri, 27 Nov 2020 10:21:37 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 4 lines · Stephen Rothwell
Hi all,
After merging the dma-mapping tree, today's linux-next build (powerpc64 allnoconfig) failed like this:
I'm looking into fixing this now, but how do you generate a powerpc64 allnoconfig? My attempts so far either create a ppc32 one or fail entirely.
echo CONFIG_PPC64=y >tmp_conf KCONFIG_ALLCONFIG=tmp_conf make ARCH=powerpc allnoconfig
Signature · 2 lines
Cheers, Stephen Rothwell
I fixed this as shown:
arch/powerpc/kernel/dma-iommu.c +2 -0
@@ -10,6 +10,7 @@#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 +65,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