From: kernel test robot <lkp@intel.com>
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 [thread overview]
Message-ID: <202201300257.biRDxeFY-lkp@intel.com> (raw)
In-Reply-To: <1643474453-32619-3-git-send-email-akhilrajeev@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 14507 bytes --]
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-GPC-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/archive/20220130/202201300257.biRDxeFY-lkp(a)intel.com/config)
compiler: sparc-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 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/6e1492836cbc56394256bd76f57ddb3d12cc65e6
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Akhil-R/Add-NVIDIA-Tegra-GPC-DMA-driver/20220130-004416
git checkout 6e1492836cbc56394256bd76f57ddb3d12cc65e6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sparc SHELL=/bin/bash drivers/dma/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/dma/tegra186-gpc-dma.c:1186:81: warning: right shift count >= width of type [-Wshift-count-overflow]
1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem >> 32));
| ^~
include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_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_ON_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 'FIELD_PREP'
1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem >> 32));
| ^~~~~~~~~~
drivers/dma/tegra186-gpc-dma.c:1186:81: warning: right shift count >= width of type [-Wshift-count-overflow]
1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem >> 32));
| ^~
include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_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_ON_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 'FIELD_PREP'
1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_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 >= width of type [-Wshift-count-overflow]
1186 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_SRC_PTR, (mem >> 32));
| ^~
include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask); \
| ^~~~
In file included from <command-line>:
drivers/dma/tegra186-gpc-dma.c:1191:81: warning: right shift count >= width of type [-Wshift-count-overflow]
1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (mem >> 32));
| ^~
include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_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_ON_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 'FIELD_PREP'
1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (mem >> 32));
| ^~~~~~~~~~
drivers/dma/tegra186-gpc-dma.c:1191:81: warning: right shift count >= width of type [-Wshift-count-overflow]
1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (mem >> 32));
| ^~
include/linux/compiler_types.h:315:23: note: in definition of macro '__compiletime_assert'
315 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler_types.h:335:9: note: in expansion of macro '_compiletime_assert'
335 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_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_ON_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 'FIELD_PREP'
1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_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 >= width of type [-Wshift-count-overflow]
1191 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADDR_DST_PTR, (mem >> 32));
| ^~
include/linux/bitfield.h:95:34: note: in definition of macro 'FIELD_PREP'
95 | ((typeof(_mask))(_val) << __bf_shf(_mask)) & (_mask); \
| ^~~~
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 = 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 = 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 = of_device_get_match_data(&pdev->dev);
1318
1319 tdma = devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channels *
1320 sizeof(struct tegra_dma_channel), GFP_KERNEL);
1321 if (!tdma)
1322 return -ENOMEM;
1323
1324 tdma->dev = &pdev->dev;
1325 tdma->chip_data = cdata;
1326 platform_set_drvdata(pdev, tdma);
1327
1328 tdma->base_addr = devm_platform_ioremap_resource(pdev, 0);
1329 if (IS_ERR(tdma->base_addr))
1330 return PTR_ERR(tdma->base_addr);
1331
1332 tdma->rst = 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 = &pdev->dev;
1340
1341 iommu_spec = 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 = iommu_spec->ids[0] & 0xffff;
1347
1348 INIT_LIST_HEAD(&tdma->dma_dev.channels);
1349 for (i = 0; i < cdata->nr_channels; i++) {
1350 struct tegra_dma_channel *tdc = &tdma->channels[i];
1351
1352 tdc->chan_base_offset = TEGRA_GPCDMA_CHANNEL_BASE_ADD_OFFSET +
1353 i * cdata->channel_reg_size;
1354 res = 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 = res->start;
1360 snprintf(tdc->name, sizeof(tdc->name), "gpcdma.%d", i);
1361
1362 tdc->tdma = tdma;
1363 tdc->id = i;
1364 tdc->slave_id = -1;
1365
1366 vchan_init(&tdc->vc, &tdma->dma_dev);
1367 tdc->vc.desc_free = 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 = 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 = 2;
1385 tdma->dma_dev.fill_align = 2;
1386 tdma->dma_dev.device_alloc_chan_resources =
1387 tegra_dma_alloc_chan_resources;
1388 tdma->dma_dev.device_free_chan_resources =
1389 tegra_dma_free_chan_resources;
1390 tdma->dma_dev.device_prep_slave_sg = tegra_dma_prep_slave_sg;
1391 tdma->dma_dev.device_prep_dma_memcpy = tegra_dma_prep_dma_memcpy;
1392 tdma->dma_dev.device_prep_dma_memset = tegra_dma_prep_dma_memset;
1393 tdma->dma_dev.device_prep_dma_cyclic = tegra_dma_prep_dma_cyclic;
1394 tdma->dma_dev.device_config = tegra_dma_slave_config;
1395 tdma->dma_dev.device_terminate_all = tegra_dma_terminate_all;
1396 tdma->dma_dev.device_tx_status = tegra_dma_tx_status;
1397 tdma->dma_dev.device_issue_pending = tegra_dma_issue_pending;
1398 tdma->dma_dev.device_pause = tegra_dma_device_pause;
1399 tdma->dma_dev.device_resume = tegra_dma_device_resume;
1400 tdma->dma_dev.device_synchronize = tegra_dma_chan_synchronize;
1401 tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
1402
1403 ret = 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 = 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
next prev parent reply other threads:[~2022-01-29 18:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-29 16:40 [PATCH v17 0/4] Add NVIDIA Tegra GPC-DMA driver Akhil R
2022-01-29 16:40 ` [PATCH v17 1/4] dt-bindings: dmaengine: Add doc for tegra gpcdma Akhil R
2022-01-29 16:40 ` [PATCH v17 2/4] dmaengine: tegra: Add tegra gpcdma driver Akhil R
2022-01-29 18:42 ` kernel test robot [this message]
2022-01-29 19:23 ` kernel test robot
2022-01-29 19:23 ` kernel test robot
2022-01-30 10:05 ` Dmitry Osipenko
2022-01-30 10:08 ` Dmitry Osipenko
2022-01-30 10:13 ` Dmitry Osipenko
2022-01-30 10:17 ` Dmitry Osipenko
2022-01-30 10:26 ` Dmitry Osipenko
2022-01-30 10:33 ` Dmitry Osipenko
2022-01-30 16:43 ` Akhil R
2022-01-30 23:23 ` Dmitry Osipenko
2022-01-30 16:34 ` Akhil R
2022-01-30 23:11 ` Dmitry Osipenko
2022-01-31 4:25 ` Akhil R
2022-01-31 6:42 ` Dmitry Osipenko
2022-01-31 9:09 ` Akhil R
2022-01-31 9:16 ` Dmitry Osipenko
2022-01-31 15:38 ` Akhil R
2022-01-31 16:08 ` Dmitry Osipenko
2022-02-01 12:05 ` Akhil R
2022-02-01 13:06 ` Dmitry Osipenko
2022-01-30 10:38 ` Dmitry Osipenko
2022-01-30 10:39 ` Dmitry Osipenko
2022-01-29 16:40 ` [PATCH v17 3/4] arm64: defconfig: tegra: Enable GPCDMA Akhil R
2022-01-29 16:40 ` [PATCH v17 4/4] arm64: tegra: Add GPCDMA node for tegra186 and tegra194 Akhil R
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202201300257.biRDxeFY-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.