linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lada Trimasova <Lada.Trimasova@synopsys.com>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-snps-arc@lists.infradead.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org,
	Lada Trimasova <Lada.Trimasova@synopsys.com>,
	Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
	Vineet Gupta <Vineet.Gupta1@synopsys.com>,
	Will Deacon <will.deacon@arm.com>, Joerg Roedel <joro@8bytes.org>
Subject: [PATCH] Fixing io-pgtable-arm build failure
Date: Wed, 13 Jan 2016 17:48:01 +0300	[thread overview]
Message-ID: <1452696481-2030-1-git-send-email-ltrimas@synopsys.com> (raw)

Trying to build kernel for ARC with both options
CONFIG_COMPILE_TEST and CONFIG_IOMMU_IO_PGTABLE_LPAE enabled
(which happened really in "allyesconfig") I'm seeing this:
---------------->8----------------
$ make ARCH=arc
...sic...
CC drivers/iommu/io-pgtable-arm.o
linux/drivers/iommu/io-pgtable-arm.c: In
function ‘__arm_lpae_alloc_pages’:
linux/drivers/iommu/io-pgtable-arm.c:221:3:
error: implicit declaration of function ‘dma_map_single’
[-Werror=implicit-function-declaration]
dma = dma_map_single(dev, pages, size, DMA_TO_DEVICE);
^
linux/drivers/iommu/io-pgtable-arm.c:221:42:
error: ‘DMA_TO_DEVICE’ undeclared (first use in this function)
dma = dma_map_single(dev, pages, size, DMA_TO_DEVICE);
^
---------------->8----------------
and so on.

IOMMU_IO_PGTABLE_LPAE depends on DMA API.
So io-pgtable-arm.c should include linux/dma-mapping.h.

Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Joerg Roedel <joro@8bytes.org>
---
 drivers/iommu/io-pgtable-arm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c
index 7df9777..0b1aca0 100644
--- a/drivers/iommu/io-pgtable-arm.c
+++ b/drivers/iommu/io-pgtable-arm.c
@@ -25,6 +25,7 @@
 #include <linux/sizes.h>
 #include <linux/slab.h>
 #include <linux/types.h>
+#include <linux/dma-mapping.h>
 
 #include <asm/barrier.h>
 
-- 
2.5.0

                 reply	other threads:[~2016-01-13 14:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1452696481-2030-1-git-send-email-ltrimas@synopsys.com \
    --to=lada.trimasova@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=Vineet.Gupta1@synopsys.com \
    --cc=joro@8bytes.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=will.deacon@arm.com \
    /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).