iommu/io-pgtable-arm: Fix io-pgtable-arm build failure
Subsystems (2)
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.
---
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
@@ -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
Joerg Roedel
AppliedQuoted 27 lines · Will Deacon
From: Lada Trimasova <[email protected]>
Trying to build a kernel for ARC with both options
CONFIG_COMPILE_TESTandCONFIG_IOMMU_IO_PGTABLE_LPAEenabled (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_LPAEdepends on DMA API,io-pgtable-arm.cshould includelinux/dma-mapping.h. This fixes the reported failure.Cc Alexey Brodkin <[email protected]>Cc Vineet Gupta <[email protected]>Cc Joerg Roedel <[email protected]>Signed-off-by Lada Trimasova <[email protected]>Signed-off-by Will Deacon <[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