]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.60/dma-iommu-fix-compilation-when-config_iommu_dma.patch
fix up queue-5.15/mm-fix-race-between-__split_huge_pmd_locked-and-gup-.patch
[thirdparty/kernel/stable-queue.git] / releases / 4.14.60 / dma-iommu-fix-compilation-when-config_iommu_dma.patch
1 From foo@baz Sat Jul 28 10:25:26 CEST 2018
2 From: Marc Zyngier <marc.zyngier@arm.com>
3 Date: Tue, 8 May 2018 13:14:33 +0100
4 Subject: dma-iommu: Fix compilation when !CONFIG_IOMMU_DMA
5
6 From: Marc Zyngier <marc.zyngier@arm.com>
7
8 [ Upstream commit 8a22a3e1e768c309b718f99bd86f9f25a453e0dc ]
9
10 Inclusion of include/dma-iommu.h when CONFIG_IOMMU_DMA is not selected
11 results in the following splat:
12
13 In file included from drivers/irqchip/irq-gic-v3-mbi.c:20:0:
14 ./include/linux/dma-iommu.h:95:69: error: unknown type name ‘dma_addr_t’
15 static inline int iommu_get_msi_cookie(struct iommu_domain *domain, dma_addr_t base)
16 ^~~~~~~~~~
17 ./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
18 static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list)
19 ^~~~~~~~~
20 scripts/Makefile.build:312: recipe for target 'drivers/irqchip/irq-gic-v3-mbi.o' failed
21
22 Fix it by including linux/types.h.
23
24 Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
25 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
26 Cc: Rob Herring <robh@kernel.org>
27 Cc: Jason Cooper <jason@lakedaemon.net>
28 Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
29 Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
30 Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
31 Cc: Miquel Raynal <miquel.raynal@bootlin.com>
32 Link: https://lkml.kernel.org/r/20180508121438.11301-5-marc.zyngier@arm.com
33 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
34 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35 ---
36 include/linux/dma-iommu.h | 1 +
37 1 file changed, 1 insertion(+)
38
39 --- a/include/linux/dma-iommu.h
40 +++ b/include/linux/dma-iommu.h
41 @@ -17,6 +17,7 @@
42 #define __DMA_IOMMU_H
43
44 #ifdef __KERNEL__
45 +#include <linux/types.h>
46 #include <asm/errno.h>
47
48 #ifdef CONFIG_IOMMU_DMA