From 843e8f41a4ae177e53a0fb199269dd1f7616cb04 Mon Sep 17 00:00:00 2001 From: "Liang Li (Euler)" Date: Fri, 13 Aug 2021 16:07:19 +0800 Subject: [PATCH] iommu: fix build error when CONFIG_IOMMU_API is off virt inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I401IF CVE: NA ------------------------------ When CONFIG_IOMMU_API is off, kernel compile failed with below error: ... LD vmlinux.o drivers/of/platform.o: In function `iommu_bind_guest_msi': platform.c:(.text+0x9e): multiple definition of `iommu_bind_guest_msi' drivers/of/device.o:device.c:(.text+0x122): first defined here .../repo/srcs/kernel/Makefile:1178: recipe for target 'vmlinux' failed ... This should be a typo introduced by commit 9db83ab7c29. Simply correct the stub function to be 'static inline' in header file should be good enough. Signed-off-by: Liang Li (Euler) Signed-off-by: Zheng Zengkai Reviewed-by: Kunkun Jiang Reviewed-by: Hanjun Guo --- include/linux/iommu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index f0e2c1f5d143..d899e7a5f234 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -1206,6 +1206,7 @@ iommu_sva_bind_group(struct iommu_group *group, struct mm_struct *mm, return NULL; } +static inline int iommu_bind_guest_msi(struct iommu_domain *domain, dma_addr_t giova, phys_addr_t gpa, size_t size) { -- GitLab