iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iommu/io-pgtable-arm: Fix io-pgtable-arm build failure
@ 2016-01-27 11:10 Will Deacon
       [not found] ` <1453893032-4459-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Will Deacon @ 2016-01-27 11:10 UTC (permalink / raw)
  To: joro-zLv9SwRftAIdnm+yROfE0A
  Cc: Lada.Trimasova-HKixBCOQz3hWk0Htik3J/w, Vineet Gupta,
	Lada Trimasova, Alexey Brodkin, Will Deacon,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

From: Lada Trimasova <Lada.Trimasova@synopsys.com>

Trying to build a kernel for ARC with both options CONFIG_COMPILE_TEST
and CONFIG_IOMMU_IO_PGTABLE_LPAE enabled (e.g. as a result of "make
allyesconfig") results in the following build failure:

 | 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);
 | ^

Since IOMMU_IO_PGTABLE_LPAE depends on DMA API, io-pgtable-arm.c should
include linux/dma-mapping.h. This fixes the reported failure.

Cc: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---

Joerg -- can you pick this up as a fix for 4.5, please? I don't have
         any other fixes queued, so a pull request seems a bit OTT.

 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 8bbcbfe7695c..381ca5a37a7b 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.1.4

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH] iommu/io-pgtable-arm: Fix io-pgtable-arm build failure
       [not found] ` <1453893032-4459-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
@ 2016-01-29 11:14   ` Joerg Roedel
  0 siblings, 0 replies; 2+ messages in thread
From: Joerg Roedel @ 2016-01-29 11:14 UTC (permalink / raw)
  To: Will Deacon
  Cc: Vineet Gupta, Lada.Trimasova-HKixBCOQz3hWk0Htik3J/w,
	Lada Trimasova, Alexey Brodkin,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Wed, Jan 27, 2016 at 11:10:32AM +0000, Will Deacon wrote:
> From: Lada Trimasova <Lada.Trimasova@synopsys.com>
> 
> Trying to build a kernel for ARC with both options CONFIG_COMPILE_TEST
> and CONFIG_IOMMU_IO_PGTABLE_LPAE enabled (e.g. as a result of "make
> allyesconfig") results in the following build failure:
> 
>  | 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);
>  | ^
> 
> Since IOMMU_IO_PGTABLE_LPAE depends on DMA API, io-pgtable-arm.c should
> include linux/dma-mapping.h. This fixes the reported failure.
> 
> Cc: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Joerg Roedel <joro@8bytes.org>
> Signed-off-by: Lada Trimasova <ltrimas@synopsys.com>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
> ---
> 
> Joerg -- can you pick this up as a fix for 4.5, please? I don't have
>          any other fixes queued, so a pull request seems a bit OTT.

Applied, thanks Will.

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2016-01-29 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-27 11:10 [PATCH] iommu/io-pgtable-arm: Fix io-pgtable-arm build failure Will Deacon
     [not found] ` <1453893032-4459-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2016-01-29 11:14   ` Joerg Roedel

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).