linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Christoph Hellwig <hch@lst.de>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: build failure after merge of the dma-mapping tree
Date: Fri, 27 Nov 2020 17:58:01 +1100	[thread overview]
Message-ID: <20201127175801.538fbb30@canb.auug.org.au> (raw)

[-- 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 --]

             reply	other threads:[~2020-11-27  6:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-27  6:58 Stephen Rothwell [this message]
2020-11-27  9:21 ` linux-next: build failure after merge of the dma-mapping tree Christoph Hellwig
2020-11-27  9:59   ` Stephen Rothwell
2020-11-27  9:33 ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2012-02-13  5:40 Stephen Rothwell
2012-02-13  7:31 ` Kyungmin Park
2012-02-13 15:05 ` Marek Szyprowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201127175801.538fbb30@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=aik@ozlabs.ru \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).