tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 236cb940335e3542c9d5ac16b5d8546a0cbbdfc1 commit: bbaaa756ad25c0e792fcd195d32acd5715f76b12 [1873/3767] iommu: Enable smmu-v3 when 3408iMR/3416iMRraid card exist config: arm64-randconfig-001-20240302 (https://download.01.org/0day-ci/archive/20240302/202403020810.4S7gi6yq-lkp@i...) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240302/202403020810.4S7gi6yq-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/202403020810.4S7gi6yq-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c: In function 'arm_smmu_init_strtab_2lvl':
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3168:41: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'pci_pcie_type'?
3168 | ret = bus_for_each_dev(&pci_bus_type, NULL, (void *)smmu, | ^~~~~~~~~~~~ | pci_pcie_type drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c:3168:41: note: each undeclared identifier is reported only once for each function it appears in
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