提交 3afa66c6 编写于 作者: L Liang Li (Euler) 提交者: Zheng Zengkai

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 9db83ab7. Simply correct
the stub function to be 'static inline' in header file should be good
enough.
Signed-off-by: NLiang Li (Euler) <liliang889@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NKunkun Jiang <jiangkunkun@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
上级 e6c81dde
...@@ -1206,6 +1206,7 @@ iommu_sva_bind_group(struct iommu_group *group, struct mm_struct *mm, ...@@ -1206,6 +1206,7 @@ iommu_sva_bind_group(struct iommu_group *group, struct mm_struct *mm,
return NULL; return NULL;
} }
static inline
int iommu_bind_guest_msi(struct iommu_domain *domain, int iommu_bind_guest_msi(struct iommu_domain *domain,
dma_addr_t giova, phys_addr_t gpa, size_t size) dma_addr_t giova, phys_addr_t gpa, size_t size)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册