From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============6293239700879217657==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v17 2/4] dmaengine: tegra: Add tegra gpcdma driver Date: Sun, 30 Jan 2022 02:42:53 +0800 Message-ID: <202201300257.biRDxeFY-lkp@intel.com> In-Reply-To: <1643474453-32619-3-git-send-email-akhilrajeev@nvidia.com> List-Id: --===============6293239700879217657== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Akhil, Thank you for the patch! Yet something to improve: [auto build test ERROR on vkoul-dmaengine/next] [also build test ERROR on robh/for-next arm64/for-next/core v5.17-rc1 next-= 20220128] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Akhil-R/Add-NVIDIA-Tegra-G= PC-DMA-driver/20220130-004416 base: https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git= next config: sparc-randconfig-r014-20220130 (https://download.01.org/0day-ci/arc= hive/20220130/202201300257.biRDxeFY-lkp(a)intel.com/config) compiler: sparc-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/6e1492836cbc56394256bd76f= 57ddb3d12cc65e6 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-d= river/20220130-004416 git checkout 6e1492836cbc56394256bd76f57ddb3d12cc65e6 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dsparc SHELL=3D/bin/bash drivers/dma/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/dma/tegra186-gpc-dma.c:1186:81: warning: right shift count >=3D = width of type [-Wshift-count-overflow] 1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_SRC_PTR, (mem >> 32)); | = ^~ include/linux/compiler_types.h:315:23: note: in definition of macro '__c= ompiletime_assert' 315 | if (!(condition)) = \ | ^~~~~~~~~ include/linux/compiler_types.h:335:9: note: in expansion of macro '_comp= iletime_assert' 335 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_O= N_MSG' 49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? = \ | ^~~~~~~~~~~~~~~~ include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_= CHECK' 94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP:= "); \ | ^~~~~~~~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:1186:33: note: in expansion of macro 'FIE= LD_PREP' 1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_SRC_PTR, (mem >> 32)); | ^~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:1186:81: warning: right shift count >=3D = width of type [-Wshift-count-overflow] 1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_SRC_PTR, (mem >> 32)); | = ^~ include/linux/compiler_types.h:315:23: note: in definition of macro '__c= ompiletime_assert' 315 | if (!(condition)) = \ | ^~~~~~~~~ include/linux/compiler_types.h:335:9: note: in expansion of macro '_comp= iletime_assert' 335 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_O= N_MSG' 49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? = \ | ^~~~~~~~~~~~~~~~ include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_= CHECK' 94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP:= "); \ | ^~~~~~~~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:1186:33: note: in expansion of macro 'FIE= LD_PREP' 1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_SRC_PTR, (mem >> 32)); | ^~~~~~~~~~ In file included from drivers/dma/tegra186-gpc-dma.c:8: drivers/dma/tegra186-gpc-dma.c:1186:81: warning: right shift count >=3D = width of type [-Wshift-count-overflow] 1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_SRC_PTR, (mem >> 32)); | = ^~ include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP' 95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_m= ask); \ | ^~~~ In file included from : drivers/dma/tegra186-gpc-dma.c:1191:81: warning: right shift count >=3D = width of type [-Wshift-count-overflow] 1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_DST_PTR, (mem >> 32)); | = ^~ include/linux/compiler_types.h:315:23: note: in definition of macro '__c= ompiletime_assert' 315 | if (!(condition)) = \ | ^~~~~~~~~ include/linux/compiler_types.h:335:9: note: in expansion of macro '_comp= iletime_assert' 335 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_O= N_MSG' 49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? = \ | ^~~~~~~~~~~~~~~~ include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_= CHECK' 94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP:= "); \ | ^~~~~~~~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:1191:33: note: in expansion of macro 'FIE= LD_PREP' 1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_DST_PTR, (mem >> 32)); | ^~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:1191:81: warning: right shift count >=3D = width of type [-Wshift-count-overflow] 1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_DST_PTR, (mem >> 32)); | = ^~ include/linux/compiler_types.h:315:23: note: in definition of macro '__c= ompiletime_assert' 315 | if (!(condition)) = \ | ^~~~~~~~~ include/linux/compiler_types.h:335:9: note: in expansion of macro '_comp= iletime_assert' 335 | _compiletime_assert(condition, msg, __compiletime_assert= _, __COUNTER__) | ^~~~~~~~~~~~~~~~~~~ include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletim= e_assert' 39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), = msg) | ^~~~~~~~~~~~~~~~~~ include/linux/bitfield.h:49:17: note: in expansion of macro 'BUILD_BUG_O= N_MSG' 49 | BUILD_BUG_ON_MSG(__builtin_constant_p(_val) ? = \ | ^~~~~~~~~~~~~~~~ include/linux/bitfield.h:94:17: note: in expansion of macro '__BF_FIELD_= CHECK' 94 | __BF_FIELD_CHECK(_mask, 0ULL, _val, "FIELD_PREP:= "); \ | ^~~~~~~~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:1191:33: note: in expansion of macro 'FIE= LD_PREP' 1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_DST_PTR, (mem >> 32)); | ^~~~~~~~~~ In file included from drivers/dma/tegra186-gpc-dma.c:8: drivers/dma/tegra186-gpc-dma.c:1191:81: warning: right shift count >=3D = width of type [-Wshift-count-overflow] 1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_DST_PTR, (mem >> 32)); | = ^~ include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP' 95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_m= ask); \ | ^~~~ drivers/dma/tegra186-gpc-dma.c: In function 'tegra_dma_probe': >> drivers/dma/tegra186-gpc-dma.c:1346:31: error: 'struct iommu_fwspec' has= no member named 'ids' 1346 | stream_id =3D iommu_spec->ids[0] & 0xffff; | ^~ vim +1346 drivers/dma/tegra186-gpc-dma.c 1307 = 1308 static int tegra_dma_probe(struct platform_device *pdev) 1309 { 1310 const struct tegra_dma_chip_data *cdata =3D NULL; 1311 struct iommu_fwspec *iommu_spec; 1312 unsigned int stream_id, i; 1313 struct tegra_dma *tdma; 1314 struct resource *res; 1315 int ret; 1316 = 1317 cdata =3D of_device_get_match_data(&pdev->dev); 1318 = 1319 tdma =3D devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channel= s * 1320 sizeof(struct tegra_dma_channel), GFP_KERNEL); 1321 if (!tdma) 1322 return -ENOMEM; 1323 = 1324 tdma->dev =3D &pdev->dev; 1325 tdma->chip_data =3D cdata; 1326 platform_set_drvdata(pdev, tdma); 1327 = 1328 tdma->base_addr =3D devm_platform_ioremap_resource(pdev, 0); 1329 if (IS_ERR(tdma->base_addr)) 1330 return PTR_ERR(tdma->base_addr); 1331 = 1332 tdma->rst =3D devm_reset_control_get_exclusive(&pdev->dev, "gpcdma"= ); 1333 if (IS_ERR(tdma->rst)) { 1334 return dev_err_probe(&pdev->dev, PTR_ERR(tdma->rst), 1335 "Missing controller reset\n"); 1336 } 1337 reset_control_reset(tdma->rst); 1338 = 1339 tdma->dma_dev.dev =3D &pdev->dev; 1340 = 1341 iommu_spec =3D dev_iommu_fwspec_get(&pdev->dev); 1342 if (!iommu_spec) { 1343 dev_err(&pdev->dev, "Missing iommu stream-id\n"); 1344 return -EINVAL; 1345 } > 1346 stream_id =3D iommu_spec->ids[0] & 0xffff; 1347 = 1348 INIT_LIST_HEAD(&tdma->dma_dev.channels); 1349 for (i =3D 0; i < cdata->nr_channels; i++) { 1350 struct tegra_dma_channel *tdc =3D &tdma->channels[i]; 1351 = 1352 tdc->chan_base_offset =3D TEGRA_GPCDMA_CHANNEL_BASE_ADD_OFFSET + 1353 i * cdata->channel_reg_size; 1354 res =3D platform_get_resource(pdev, IORESOURCE_IRQ, i); 1355 if (!res) { 1356 dev_err(&pdev->dev, "No irq resource for chan %d\n", i); 1357 return -EINVAL; 1358 } 1359 tdc->irq =3D res->start; 1360 snprintf(tdc->name, sizeof(tdc->name), "gpcdma.%d", i); 1361 = 1362 tdc->tdma =3D tdma; 1363 tdc->id =3D i; 1364 tdc->slave_id =3D -1; 1365 = 1366 vchan_init(&tdc->vc, &tdma->dma_dev); 1367 tdc->vc.desc_free =3D tegra_dma_desc_free; 1368 = 1369 /* program stream-id for this channel */ 1370 tegra_dma_program_sid(tdc, i, stream_id); 1371 tdc->stream_id =3D stream_id; 1372 } 1373 = 1374 dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask); 1375 dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask); 1376 dma_cap_set(DMA_MEMCPY, tdma->dma_dev.cap_mask); 1377 dma_cap_set(DMA_MEMSET, tdma->dma_dev.cap_mask); 1378 dma_cap_set(DMA_CYCLIC, tdma->dma_dev.cap_mask); 1379 = 1380 /* 1381 * Only word aligned transfers are supported. Set the copy 1382 * alignment shift. 1383 */ 1384 tdma->dma_dev.copy_align =3D 2; 1385 tdma->dma_dev.fill_align =3D 2; 1386 tdma->dma_dev.device_alloc_chan_resources =3D 1387 tegra_dma_alloc_chan_resources; 1388 tdma->dma_dev.device_free_chan_resources =3D 1389 tegra_dma_free_chan_resources; 1390 tdma->dma_dev.device_prep_slave_sg =3D tegra_dma_prep_slave_sg; 1391 tdma->dma_dev.device_prep_dma_memcpy =3D tegra_dma_prep_dma_memcpy; 1392 tdma->dma_dev.device_prep_dma_memset =3D tegra_dma_prep_dma_memset; 1393 tdma->dma_dev.device_prep_dma_cyclic =3D tegra_dma_prep_dma_cyclic; 1394 tdma->dma_dev.device_config =3D tegra_dma_slave_config; 1395 tdma->dma_dev.device_terminate_all =3D tegra_dma_terminate_all; 1396 tdma->dma_dev.device_tx_status =3D tegra_dma_tx_status; 1397 tdma->dma_dev.device_issue_pending =3D tegra_dma_issue_pending; 1398 tdma->dma_dev.device_pause =3D tegra_dma_device_pause; 1399 tdma->dma_dev.device_resume =3D tegra_dma_device_resume; 1400 tdma->dma_dev.device_synchronize =3D tegra_dma_chan_synchronize; 1401 tdma->dma_dev.residue_granularity =3D DMA_RESIDUE_GRANULARITY_BURST; 1402 = 1403 ret =3D dma_async_device_register(&tdma->dma_dev); 1404 if (ret < 0) { 1405 dev_err_probe(&pdev->dev, ret, 1406 "GPC DMA driver registration failed\n"); 1407 return ret; 1408 } 1409 = 1410 ret =3D of_dma_controller_register(pdev->dev.of_node, 1411 tegra_dma_of_xlate, tdma); 1412 if (ret < 0) { 1413 dev_err_probe(&pdev->dev, ret, 1414 "GPC DMA OF registration failed\n"); 1415 = 1416 dma_async_device_unregister(&tdma->dma_dev); 1417 return ret; 1418 } 1419 = 1420 dev_info(&pdev->dev, "GPC DMA driver register %d channels\n", 1421 cdata->nr_channels); 1422 = 1423 return 0; 1424 } 1425 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============6293239700879217657==--