CC: [email protected] In-Reply-To: <837d7131e83b06ce222bda678fe2e8ac7ba095f2.1591587029.git.baolin.w...@linux.alibaba.com> References: <837d7131e83b06ce222bda678fe2e8ac7ba095f2.1591587029.git.baolin.w...@linux.alibaba.com> TO: Baolin Wang <[email protected]> TO: [email protected] TO: [email protected] TO: [email protected] TO: [email protected] TO: [email protected] TO: [email protected] TO: [email protected] TO: [email protected] TO: [email protected] TO: [email protected]
Hi Baolin, I love your patch! Perhaps something to improve: [auto build test WARNING on iommu/next] [also build test WARNING on soc/for-next linus/master v5.7 next-20200605] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Baolin-Wang/Some-improvements-for-iommu/20200608-114141 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next :::::: branch date: 4 hours ago :::::: commit date: 4 hours ago config: x86_64-randconfig-s021-20200607 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-247-gcadbd124-dirty # save the attached .config to linux build tree make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> sparse warnings: (new ones prefixed by >>) >> drivers/iommu/io-pgtable-arm.c:1178:37: sparse: sparse: not enough arguments >> for function map drivers/iommu/io-pgtable-arm.c:1185:38: sparse: sparse: not enough arguments for function map drivers/iommu/io-pgtable-arm.c:1201:29: sparse: sparse: not enough arguments for function map drivers/iommu/io-pgtable-arm.c:1219:37: sparse: sparse: not enough arguments for function map # https://github.com/0day-ci/linux/commit/6047fa5558b1fdb8d2d52c9807fd960220478d3d git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 6047fa5558b1fdb8d2d52c9807fd960220478d3d vim +1178 drivers/iommu/io-pgtable-arm.c fe4b991dcd84e0 Will Deacon 2014-11-17 1135 fe4b991dcd84e0 Will Deacon 2014-11-17 1136 static int __init arm_lpae_run_tests(struct io_pgtable_cfg *cfg) fe4b991dcd84e0 Will Deacon 2014-11-17 1137 { 9062c1d0bedacf Christophe JAILLET 2019-09-09 1138 static const enum io_pgtable_fmt fmts[] __initconst = { fe4b991dcd84e0 Will Deacon 2014-11-17 1139 ARM_64_LPAE_S1, fe4b991dcd84e0 Will Deacon 2014-11-17 1140 ARM_64_LPAE_S2, fe4b991dcd84e0 Will Deacon 2014-11-17 1141 }; fe4b991dcd84e0 Will Deacon 2014-11-17 1142 fe4b991dcd84e0 Will Deacon 2014-11-17 1143 int i, j; fe4b991dcd84e0 Will Deacon 2014-11-17 1144 unsigned long iova; fe4b991dcd84e0 Will Deacon 2014-11-17 1145 size_t size; fe4b991dcd84e0 Will Deacon 2014-11-17 1146 struct io_pgtable_ops *ops; fe4b991dcd84e0 Will Deacon 2014-11-17 1147 fe4b991dcd84e0 Will Deacon 2014-11-17 1148 selftest_running = true; fe4b991dcd84e0 Will Deacon 2014-11-17 1149 fe4b991dcd84e0 Will Deacon 2014-11-17 1150 for (i = 0; i < ARRAY_SIZE(fmts); ++i) { fe4b991dcd84e0 Will Deacon 2014-11-17 1151 cfg_cookie = cfg; fe4b991dcd84e0 Will Deacon 2014-11-17 1152 ops = alloc_io_pgtable_ops(fmts[i], cfg, cfg); fe4b991dcd84e0 Will Deacon 2014-11-17 1153 if (!ops) { fe4b991dcd84e0 Will Deacon 2014-11-17 1154 pr_err("selftest: failed to allocate io pgtable ops\n"); fe4b991dcd84e0 Will Deacon 2014-11-17 1155 return -ENOMEM; fe4b991dcd84e0 Will Deacon 2014-11-17 1156 } fe4b991dcd84e0 Will Deacon 2014-11-17 1157 fe4b991dcd84e0 Will Deacon 2014-11-17 1158 /* fe4b991dcd84e0 Will Deacon 2014-11-17 1159 * Initial sanity checks. fe4b991dcd84e0 Will Deacon 2014-11-17 1160 * Empty page tables shouldn't provide any translations. fe4b991dcd84e0 Will Deacon 2014-11-17 1161 */ fe4b991dcd84e0 Will Deacon 2014-11-17 1162 if (ops->iova_to_phys(ops, 42)) fe4b991dcd84e0 Will Deacon 2014-11-17 1163 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1164 fe4b991dcd84e0 Will Deacon 2014-11-17 1165 if (ops->iova_to_phys(ops, SZ_1G + 42)) fe4b991dcd84e0 Will Deacon 2014-11-17 1166 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1167 fe4b991dcd84e0 Will Deacon 2014-11-17 1168 if (ops->iova_to_phys(ops, SZ_2G + 42)) fe4b991dcd84e0 Will Deacon 2014-11-17 1169 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1170 fe4b991dcd84e0 Will Deacon 2014-11-17 1171 /* fe4b991dcd84e0 Will Deacon 2014-11-17 1172 * Distinct mappings of different granule sizes. fe4b991dcd84e0 Will Deacon 2014-11-17 1173 */ fe4b991dcd84e0 Will Deacon 2014-11-17 1174 iova = 0; 4ae8a5c528c0b1 Kefeng Wang 2016-09-21 1175 for_each_set_bit(j, &cfg->pgsize_bitmap, BITS_PER_LONG) { fe4b991dcd84e0 Will Deacon 2014-11-17 1176 size = 1UL << j; fe4b991dcd84e0 Will Deacon 2014-11-17 1177 fe4b991dcd84e0 Will Deacon 2014-11-17 @1178 if (ops->map(ops, iova, iova, size, IOMMU_READ | fe4b991dcd84e0 Will Deacon 2014-11-17 1179 IOMMU_WRITE | fe4b991dcd84e0 Will Deacon 2014-11-17 1180 IOMMU_NOEXEC | fe4b991dcd84e0 Will Deacon 2014-11-17 1181 IOMMU_CACHE)) fe4b991dcd84e0 Will Deacon 2014-11-17 1182 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1183 fe4b991dcd84e0 Will Deacon 2014-11-17 1184 /* Overlapping mappings */ fe4b991dcd84e0 Will Deacon 2014-11-17 1185 if (!ops->map(ops, iova, iova + size, size, fe4b991dcd84e0 Will Deacon 2014-11-17 1186 IOMMU_READ | IOMMU_NOEXEC)) fe4b991dcd84e0 Will Deacon 2014-11-17 1187 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1188 fe4b991dcd84e0 Will Deacon 2014-11-17 1189 if (ops->iova_to_phys(ops, iova + 42) != (iova + 42)) fe4b991dcd84e0 Will Deacon 2014-11-17 1190 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1191 fe4b991dcd84e0 Will Deacon 2014-11-17 1192 iova += SZ_1G; fe4b991dcd84e0 Will Deacon 2014-11-17 1193 } fe4b991dcd84e0 Will Deacon 2014-11-17 1194 fe4b991dcd84e0 Will Deacon 2014-11-17 1195 /* Partial unmap */ fe4b991dcd84e0 Will Deacon 2014-11-17 1196 size = 1UL << __ffs(cfg->pgsize_bitmap); a2d3a382d6c682 Will Deacon 2019-07-02 1197 if (ops->unmap(ops, SZ_1G + size, size, NULL) != size) fe4b991dcd84e0 Will Deacon 2014-11-17 1198 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1199 fe4b991dcd84e0 Will Deacon 2014-11-17 1200 /* Remap of partial unmap */ fe4b991dcd84e0 Will Deacon 2014-11-17 1201 if (ops->map(ops, SZ_1G + size, size, size, IOMMU_READ)) fe4b991dcd84e0 Will Deacon 2014-11-17 1202 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1203 fe4b991dcd84e0 Will Deacon 2014-11-17 1204 if (ops->iova_to_phys(ops, SZ_1G + size + 42) != (size + 42)) fe4b991dcd84e0 Will Deacon 2014-11-17 1205 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1206 fe4b991dcd84e0 Will Deacon 2014-11-17 1207 /* Full unmap */ fe4b991dcd84e0 Will Deacon 2014-11-17 1208 iova = 0; f793b13ef0c9c1 YueHaibing 2018-04-26 1209 for_each_set_bit(j, &cfg->pgsize_bitmap, BITS_PER_LONG) { fe4b991dcd84e0 Will Deacon 2014-11-17 1210 size = 1UL << j; fe4b991dcd84e0 Will Deacon 2014-11-17 1211 a2d3a382d6c682 Will Deacon 2019-07-02 1212 if (ops->unmap(ops, iova, size, NULL) != size) fe4b991dcd84e0 Will Deacon 2014-11-17 1213 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1214 fe4b991dcd84e0 Will Deacon 2014-11-17 1215 if (ops->iova_to_phys(ops, iova + 42)) fe4b991dcd84e0 Will Deacon 2014-11-17 1216 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1217 fe4b991dcd84e0 Will Deacon 2014-11-17 1218 /* Remap full block */ fe4b991dcd84e0 Will Deacon 2014-11-17 1219 if (ops->map(ops, iova, iova, size, IOMMU_WRITE)) fe4b991dcd84e0 Will Deacon 2014-11-17 1220 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1221 fe4b991dcd84e0 Will Deacon 2014-11-17 1222 if (ops->iova_to_phys(ops, iova + 42) != (iova + 42)) fe4b991dcd84e0 Will Deacon 2014-11-17 1223 return __FAIL(ops, i); fe4b991dcd84e0 Will Deacon 2014-11-17 1224 fe4b991dcd84e0 Will Deacon 2014-11-17 1225 iova += SZ_1G; fe4b991dcd84e0 Will Deacon 2014-11-17 1226 } fe4b991dcd84e0 Will Deacon 2014-11-17 1227 fe4b991dcd84e0 Will Deacon 2014-11-17 1228 free_io_pgtable_ops(ops); fe4b991dcd84e0 Will Deacon 2014-11-17 1229 } fe4b991dcd84e0 Will Deacon 2014-11-17 1230 fe4b991dcd84e0 Will Deacon 2014-11-17 1231 selftest_running = false; fe4b991dcd84e0 Will Deacon 2014-11-17 1232 return 0; fe4b991dcd84e0 Will Deacon 2014-11-17 1233 } fe4b991dcd84e0 Will Deacon 2014-11-17 1234 :::::: The code at line 1178 was first introduced by commit :::::: fe4b991dcd84e0104cf2e29223a819335ed048a7 iommu: add self-consistency tests to ARM LPAE IO page table allocator :::::: TO: Will Deacon <[email protected]> :::::: CC: Will Deacon <[email protected]> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/[email protected]
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
