[PATCH] Fixing io-pgtable-arm build failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>
Cc: Alexey Brodkin <abrodkin@xxxxxxxxxxxx>
Cc: Vineet Gupta <vgupta@xxxxxxxxxxxx>
Cc: Will Deacon <will.deacon@xxxxxxx>
Cc: Joerg Roedel <joro@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux