Skip to contentSkip to conversation

iommu/io-pgtable-arm: Fix io-pgtable-arm build failure

PATCH Applied Will Deacon 2 participants 2 messages Jan 27, 2016 – Jan 29, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu/io-pgtable-arm: Fix io-pgtable-arm build failure

From: Lada Trimasova <[email protected]>

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 <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Joerg Roedel <[email protected]>

---

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(+)
drivers/iommu/io-pgtable-arm.c +1 -0
index 8bbcbfe7695c..381ca5a37a7b 100644
@@ -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>
 
Signature · 6 lines
2.1.4

_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

A message that is not in the archive (sent off-list or not yet received): 1453893032-4459-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org

Applied
#2 lore raw
Quoted 27 lines · Will Deacon

From: Lada Trimasova <[email protected]>

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 <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Joerg Roedel <[email protected]>
Quoted 4 lines

---

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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu