提交 d77bc737 编写于 作者: Z Zheng Zengkai 提交者: Yang Yingliang

iommu: smmuv2: fix compile error when CONFIG_ARCH_PHYTIUM is off

phytium inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I41AUQ

--------------------------------------

Disabling CONFIG_ARCH_PHYTIUM results in following compile errors:

drivers/iommu/arm-smmu.c: In function ‘phytium_smmu_def_domain_type’:
drivers/iommu/arm-smmu.c:1641:6: error: implicit declaration of function ‘typeof_ft2000plus’ [-Werror=implicit-function-declaration]
 1641 |  if (typeof_ft2000plus() || typeof_s2500()) {
      |      ^~~~~~~~~~~~~~~~~
drivers/iommu/arm-smmu.c:1641:29: error: implicit declaration of function ‘typeof_s2500’ [-Werror=implicit-function-declaration]
 1641 |  if (typeof_ft2000plus() || typeof_s2500()) {
      |                             ^~~~~~~~~~~~
cc1: some warnings being treated as errors

Fix it by using CONFIG_ARCH_PHYTIUM to control phytium related code.
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 c89f49b5
......@@ -1634,8 +1634,7 @@ static void arm_smmu_put_resv_regions(struct device *dev,
#ifdef CONFIG_SMMU_BYPASS_DEV
#ifdef CONFIG_ARM64
#include <asm/cputype.h>
#ifdef CONFIG_ARCH_PHYTIUM
static int phytium_smmu_def_domain_type(struct device *dev, unsigned int *type)
{
if (typeof_ft2000plus() || typeof_s2500()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册