From: Zheng Zengkai zhengzengkai@huawei.com
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: Zheng Zengkai zhengzengkai@huawei.com Reviewed-by: Zhen Lei thunder.leizhen@huawei.com Reviewed-by: wangxiongfeng 00379786 wangxiongfeng2@huawei.com Signed-off-by: Yang Yingliang yangyingliang@huawei.com --- drivers/iommu/arm-smmu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 18863198bb036..d1c00b1dfd2ef 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -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()) {