Hi luochunsheng,
FYI, the error/warning still remains.
tree: https://gitee.com/openeuler/kernel.git openEuler-1.0-LTS head: 58ec866c31299a4b0d63a01cb026877c5f85e4d9 commit: d70a672bcf377261c1b9f07009d22aef935e7b92 [1290/1290] iommu: smmu-v3 support Virtualization feature when 3408iMR/3416iMRraid card exist config: arm64-randconfig-001-20241112 (https://download.01.org/0day-ci/archive/20241113/202411130719.5GGQe3oi-lkp@i...) compiler: aarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241113/202411130719.5GGQe3oi-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/202411130719.5GGQe3oi-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/iommu/arm-smmu-v3.c: In function 'arm_smmu_init_strtab_2lvl':
drivers/iommu/arm-smmu-v3.c:2896:41: error: 'pci_bus_type' undeclared (first use in this function); did you mean 'pci_pcie_type'?
2896 | ret = bus_for_each_dev(&pci_bus_type, NULL, (void *)smmu, | ^~~~~~~~~~~~ | pci_pcie_type drivers/iommu/arm-smmu-v3.c:2896:41: note: each undeclared identifier is reported only once for each function it appears in drivers/iommu/arm-smmu-v3.c: In function 'arm_smmu_write_strtab_ent': drivers/iommu/arm-smmu-v3.c:1229:28: warning: this statement may fall through [-Wimplicit-fallthrough=] 1229 | if (disable_bypass) | ^ drivers/iommu/arm-smmu-v3.c:1231:17: note: here 1231 | default: | ^~~~~~~
vim +2896 drivers/iommu/arm-smmu-v3.c
2861 2862 /* Calculate the L1 size, capped to the SIDSIZE. */ 2863 size = STRTAB_L1_SZ_SHIFT - (ilog2(STRTAB_L1_DESC_DWORDS) + 3); 2864 size = min(size, smmu->sid_bits - STRTAB_SPLIT); 2865 cfg->num_l1_ents = 1 << size; 2866 2867 size += STRTAB_SPLIT; 2868 if (size < smmu->sid_bits) 2869 dev_warn(smmu->dev, 2870 "2-level strtab only covers %u/%u bits of SID\n", 2871 size, smmu->sid_bits); 2872 2873 l1size = cfg->num_l1_ents * (STRTAB_L1_DESC_DWORDS << 3); 2874 strtab = dmam_alloc_coherent(smmu->dev, l1size, &cfg->strtab_dma, 2875 GFP_KERNEL | __GFP_ZERO); 2876 if (!strtab) { 2877 dev_err(smmu->dev, 2878 "failed to allocate l1 stream table (%u bytes)\n", 2879 size); 2880 return -ENOMEM; 2881 } 2882 cfg->strtab = strtab; 2883 2884 /* Configure strtab_base_cfg for 2 levels */ 2885 reg = FIELD_PREP(STRTAB_BASE_CFG_FMT, STRTAB_BASE_CFG_FMT_2LVL); 2886 reg |= FIELD_PREP(STRTAB_BASE_CFG_LOG2SIZE, size); 2887 reg |= FIELD_PREP(STRTAB_BASE_CFG_SPLIT, STRTAB_SPLIT); 2888 cfg->strtab_base_cfg = reg; 2889 2890 #ifdef CONFIG_SMMU_BYPASS_DEV 2891 ret = arm_smmu_init_l1_strtab(smmu); 2892 if (ret) 2893 return ret; 2894 2895 if (smmu_bypass_devices_num) {
2896 ret = bus_for_each_dev(&pci_bus_type, NULL, (void *)smmu,
2897 arm_smmu_prepare_init_l2_strtab); 2898 } 2899 return ret; 2900 #else 2901 return arm_smmu_init_l1_strtab(smmu); 2902 #endif 2903 } 2904