
tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 1411c9cacc81e717a12469bc436d6b114f517692 commit: 115aeeba0e638db97ec4448f77101a3a1c7c23b2 [2976/2976] iommu/arm-smmu-v3: Report IOMMU_CAP_ENFORCE_CACHE_COHERENCY for CANWBS config: arm64-randconfig-004-20251017 (https://download.01.org/0day-ci/archive/20251017/202510171131.XB9hn3b4-lkp@i...) compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project 754ebc6ebb9fb9fbee7aef33478c74ea74949853) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251017/202510171131.XB9hn3b4-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/202510171131.XB9hn3b4-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from drivers/pci/access.c:2: In file included from include/linux/pci.h:1669: In file included from include/linux/dmapool.h:14: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2247: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from drivers/pci/access.c:13: In file included from arch/arm64/include/asm/virtcca_coda.h:11:
arch/arm64/include/../../../drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h:940:44: error: no member named 'flags' in 'struct iommu_fwspec' 940 | return dev_iommu_fwspec_get(master->dev)->flags & | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ arch/arm64/include/../../../drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h:941:9: error: use of undeclared identifier 'IOMMU_FWSPEC_PCI_RC_CANWBS' 941 | IOMMU_FWSPEC_PCI_RC_CANWBS; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning and 2 errors generated. -- In file included from drivers/coda/coda.c:5: In file included from include/linux/kvm_host.h:16: In file included from include/linux/mm.h:2247: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from drivers/coda/coda.c:7: In file included from arch/arm64/include/asm/virtcca_coda.h:11: arch/arm64/include/../../../drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h:940:44: error: no member named 'flags' in 'struct iommu_fwspec' 940 | return dev_iommu_fwspec_get(master->dev)->flags & | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ arch/arm64/include/../../../drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h:941:9: error: use of undeclared identifier 'IOMMU_FWSPEC_PCI_RC_CANWBS' 941 | IOMMU_FWSPEC_PCI_RC_CANWBS; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/coda/coda.c:504:11: error: call to undeclared function 'dev_iommu_priv_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 504 | master = dev_iommu_priv_get(dev); | ^ drivers/coda/coda.c:504:11: note: did you mean 'dev_iommu_fwspec_get'? include/linux/iommu.h:1598:36: note: 'dev_iommu_fwspec_get' declared here 1598 | static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device *dev) | ^ drivers/coda/coda.c:504:9: error: incompatible integer to pointer conversion assigning to 'struct arm_smmu_master *' from 'int' [-Wint-conversion] 504 | master = dev_iommu_priv_get(dev); | ^ ~~~~~~~~~~~~~~~~~~~~~~~ drivers/coda/coda.c:486:5: warning: no previous prototype for function 'virtcca_secure_dev_operator' [-Wmissing-prototypes] 486 | int virtcca_secure_dev_operator(struct device *dev, void *domain) | ^ drivers/coda/coda.c:486:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 486 | int virtcca_secure_dev_operator(struct device *dev, void *domain) | ^ | static 2 warnings and 4 errors generated. -- In file included from drivers/coda/coda_vfio.c:5: In file included from include/linux/io-pgtable.h:6: In file included from include/linux/iommu.h:10: In file included from include/linux/scatterlist.h:8: In file included from include/linux/mm.h:2247: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from drivers/coda/coda_vfio.c:8: In file included from arch/arm64/include/asm/virtcca_coda.h:11: arch/arm64/include/../../../drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h:940:44: error: no member named 'flags' in 'struct iommu_fwspec' 940 | return dev_iommu_fwspec_get(master->dev)->flags & | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ arch/arm64/include/../../../drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h:941:9: error: use of undeclared identifier 'IOMMU_FWSPEC_PCI_RC_CANWBS' 941 | IOMMU_FWSPEC_PCI_RC_CANWBS; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/coda/coda_vfio.c:171:12: error: call to undeclared function 'iommu_pgsize'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 171 | pgsize = iommu_pgsize(domain, iova, paddr, size, &count); | ^ drivers/coda/coda_vfio.c:192:21: error: incomplete definition of type 'const struct iommu_domain_ops' 192 | if (ret == 0 && ops->iotlb_sync_map) { | ~~~^ include/linux/iommu.h:39:8: note: forward declaration of 'struct iommu_domain_ops' 39 | struct iommu_domain_ops; | ^ drivers/coda/coda_vfio.c:193:12: error: incomplete definition of type 'const struct iommu_domain_ops' 193 | ret = ops->iotlb_sync_map(domain, iova, size); | ~~~^ include/linux/iommu.h:39:8: note: forward declaration of 'struct iommu_domain_ops' 39 | struct iommu_domain_ops; | ^ drivers/coda/coda_vfio.c:257:12: error: call to undeclared function 'iommu_pgsize'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 257 | pgsize = iommu_pgsize(domain, iova, iova, size - unmapped, &count); | ^ drivers/coda/coda_vfio.c:323:5: warning: no previous prototype for function 'virtcca_set_dev_msi_addr' [-Wmissing-prototypes] 323 | int virtcca_set_dev_msi_addr(struct device *dev, void *iova) | ^ drivers/coda/coda_vfio.c:323:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 323 | int virtcca_set_dev_msi_addr(struct device *dev, void *iova) | ^ | static 2 warnings and 6 errors generated.
vim +940 arch/arm64/include/../../../drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h 916 917 void arm_smmu_clear_cd(struct arm_smmu_master *master, ioasid_t ssid); 918 struct arm_smmu_cd *arm_smmu_get_cd_ptr(struct arm_smmu_master *master, 919 u32 ssid); 920 void arm_smmu_make_s1_cd(struct arm_smmu_cd *target, 921 struct arm_smmu_master *master, 922 struct arm_smmu_domain *smmu_domain); 923 void arm_smmu_write_cd_entry(struct arm_smmu_master *master, int ssid, 924 struct arm_smmu_cd *cdptr, 925 const struct arm_smmu_cd *target); 926 927 int arm_smmu_set_pasid(struct arm_smmu_master *master, 928 struct arm_smmu_domain *smmu_domain, ioasid_t pasid, 929 struct arm_smmu_cd *cd); 930 931 void arm_smmu_tlb_inv_asid(struct arm_smmu_device *smmu, u16 asid); 932 void arm_smmu_tlb_inv_range_asid(unsigned long iova, size_t size, int asid, 933 size_t granule, bool leaf, 934 struct arm_smmu_domain *smmu_domain); 935 int arm_smmu_atc_inv_domain(struct arm_smmu_domain *smmu_domain, 936 unsigned long iova, size_t size); 937 938 static inline bool arm_smmu_master_canwbs(struct arm_smmu_master *master) 939 {
940 return dev_iommu_fwspec_get(master->dev)->flags & 941 IOMMU_FWSPEC_PCI_RC_CANWBS; 942 } 943
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki