Hi zhangnaichuan,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 91ff8f4b711382909faa289c49735e0514af6f76 commit: bbaaa756ad25c0e792fcd195d32acd5715f76b12 [1873/14244] iommu: Enable smmu-v3 when 3408iMR/3416iMRraid card exist config: arm64-randconfig-002-20240930 (https://download.01.org/0day-ci/archive/20240930/202409300716.0blXmgwd-lkp@i...) compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240930/202409300716.0blXmgwd-lkp@i...)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot lkp@intel.com | Closes: https://lore.kernel.org/oe-kbuild-all/202409300716.0blXmgwd-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3168:27: error: use of undeclared identifier 'pci_bus_type'; did you mean 'pci_pcie_type'?
ret = bus_for_each_dev(&pci_bus_type, NULL, (void *)smmu, ^~~~~~~~~~~~ pci_pcie_type include/linux/pci.h:2453:19: note: 'pci_pcie_type' declared here static inline int pci_pcie_type(const struct pci_dev *dev) ^ 1 error generated.
vim +3168 drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
3129 3130 static int arm_smmu_init_strtab_2lvl(struct arm_smmu_device *smmu) 3131 { 3132 void *strtab; 3133 u64 reg; 3134 u32 size, l1size; 3135 struct arm_smmu_strtab_cfg *cfg = &smmu->strtab_cfg; 3136 int ret; 3137 3138 /* Calculate the L1 size, capped to the SIDSIZE. */ 3139 size = STRTAB_L1_SZ_SHIFT - (ilog2(STRTAB_L1_DESC_DWORDS) + 3); 3140 size = min(size, smmu->sid_bits - STRTAB_SPLIT); 3141 cfg->num_l1_ents = 1 << size; 3142 3143 size += STRTAB_SPLIT; 3144 if (size < smmu->sid_bits) 3145 dev_warn(smmu->dev, 3146 "2-level strtab only covers %u/%u bits of SID\n", 3147 size, smmu->sid_bits); 3148 3149 l1size = cfg->num_l1_ents * (STRTAB_L1_DESC_DWORDS << 3); 3150 strtab = dmam_alloc_coherent(smmu->dev, l1size, &cfg->strtab_dma, 3151 GFP_KERNEL); 3152 if (!strtab) { 3153 dev_err(smmu->dev, 3154 "failed to allocate l1 stream table (%u bytes)\n", 3155 l1size); 3156 return -ENOMEM; 3157 } 3158 cfg->strtab = strtab; 3159 3160 /* Configure strtab_base_cfg for 2 levels */ 3161 reg = FIELD_PREP(STRTAB_BASE_CFG_FMT, STRTAB_BASE_CFG_FMT_2LVL); 3162 reg |= FIELD_PREP(STRTAB_BASE_CFG_LOG2SIZE, size); 3163 reg |= FIELD_PREP(STRTAB_BASE_CFG_SPLIT, STRTAB_SPLIT); 3164 cfg->strtab_base_cfg = reg; 3165 ret = arm_smmu_init_l1_strtab(smmu); 3166 #ifdef CONFIG_SMMU_BYPASS_DEV 3167 if (!ret && smmu_bypass_devices_num) {
3168 ret = bus_for_each_dev(&pci_bus_type, NULL, (void *)smmu,
3169 arm_smmu_prepare_init_l2_strtab); 3170 } 3171 #endif 3172 return ret; 3173 } 3174