dma-iommu: Fix compilation when !CONFIG_IOMMU_DMA
authorMarc Zyngier <>
Tue, 8 May 2018 12:14:33 +0000 (13:14 +0100)
committerThomas Gleixner <>
Sun, 13 May 2018 13:59:00 +0000 (15:59 +0200)
Inclusion of include/dma-iommu.h when CONFIG_IOMMU_DMA is not selected
results in the following splat:

In file included from drivers/irqchip/irq-gic-v3-mbi.c:20:0:
./include/linux/dma-iommu.h:95:69: error: unknown type name ‘dma_addr_t’
 static inline int iommu_get_msi_cookie(struct iommu_domain *domain, dma_addr_t base)
./include/linux/dma-iommu.h:108:74: warning: ‘struct list_head’ declared inside parameter list will not be visible outside of this definition or declaration
 static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list)
scripts/ recipe for target 'drivers/irqchip/irq-gic-v3-mbi.o' failed

Fix it by including linux/types.h.

Signed-off-by: Marc Zyngier <>
Signed-off-by: Thomas Gleixner <>
Cc: Rob Herring <>
Cc: Jason Cooper <>
Cc: Ard Biesheuvel <>
Cc: Srinivas Kandagatla <>
Cc: Thomas Petazzoni <>
Cc: Miquel Raynal <>

index 92f20832fd28770c16ab9d34c5560efce2a888c6..e8ca5e6542773fea4c54725f360743e3f1407b7c 100644 (file)
@@ -17,6 +17,7 @@
 #define __DMA_IOMMU_H
 #ifdef __KERNEL__
+#include <linux/types.h>
 #include <asm/errno.h>