Content-Type: multipart/mixed; boundary="===============6311145862917286354==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v13 2/4] dmaengine: tegra: Add tegra gpcdma driver Date: Thu, 25 Nov 2021 21:42:50 +0800 Message-ID: <202111252148.4CbCTolF-lkp@intel.com> In-Reply-To: <1637573292-13214-3-git-send-email-akhilrajeev@nvidia.com> List-Id: --===============6311145862917286354== 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 robh/for-next] [also build test ERROR on vkoul-dmaengine/next arm64/for-next/core v5.16-rc= 2 next-20211125] [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/20211122-173019 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-= next config: arc-randconfig-m031-20211123 (https://download.01.org/0day-ci/archi= ve/20211125/202111252148.4CbCTolF-lkp(a)intel.com/config) compiler: arceb-elf-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/7707da9f914433ccc5718dd34= 31153d3b5bf485d 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/20211122-173019 git checkout 7707da9f914433ccc5718dd3431153d3b5bf485d # 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=3Darc 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:966:81: warning: right shift count >=3D w= idth of type [-Wshift-count-overflow] 966 | 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:966:33: note: in expansion of macro 'FIEL= D_PREP' 966 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_SRC_PTR, (mem >> 32)); | ^~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:966:81: warning: right shift count >=3D w= idth of type [-Wshift-count-overflow] 966 | 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:966:33: note: in expansion of macro 'FIEL= D_PREP' 966 | 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:966:81: warning: right shift count >=3D w= idth of type [-Wshift-count-overflow] 966 | 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:971:81: warning: right shift count >=3D w= idth of type [-Wshift-count-overflow] 971 | 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:971:33: note: in expansion of macro 'FIEL= D_PREP' 971 | FIELD_PREP(TEGRA_GPCDMA_HIGH_ADD= R_DST_PTR, (mem >> 32)); | ^~~~~~~~~~ drivers/dma/tegra186-gpc-dma.c:971:81: warning: right shift count >=3D w= idth of type [-Wshift-count-overflow] 971 | 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:971:33: note: in expansion of macro 'FIEL= D_PREP' 971 | 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:971:81: warning: right shift count >=3D w= idth of type [-Wshift-count-overflow] 971 | 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:1121:31: error: 'struct iommu_fwspec' has= no member named 'ids' 1121 | stream_id =3D iommu_spec->ids[0] & 0xffff; | ^~ vim +1121 drivers/dma/tegra186-gpc-dma.c 1081 = 1082 static int tegra_dma_probe(struct platform_device *pdev) 1083 { 1084 const struct tegra_dma_chip_data *cdata =3D NULL; 1085 struct iommu_fwspec *iommu_spec; 1086 unsigned int stream_id, i; 1087 struct tegra_dma *tdma; 1088 struct resource *res; 1089 int ret; 1090 = 1091 cdata =3D of_device_get_match_data(&pdev->dev); 1092 = 1093 tdma =3D devm_kzalloc(&pdev->dev, sizeof(*tdma) + cdata->nr_channel= s * 1094 sizeof(struct tegra_dma_channel), GFP_KERNEL); 1095 if (!tdma) 1096 return -ENOMEM; 1097 = 1098 tdma->dev =3D &pdev->dev; 1099 tdma->chip_data =3D cdata; 1100 platform_set_drvdata(pdev, tdma); 1101 = 1102 tdma->base_addr =3D devm_platform_ioremap_resource(pdev, 0); 1103 if (IS_ERR(tdma->base_addr)) 1104 return PTR_ERR(tdma->base_addr); 1105 = 1106 tdma->rst =3D devm_reset_control_get_exclusive(&pdev->dev, "gpcdma"= ); 1107 if (IS_ERR(tdma->rst)) { 1108 dev_err_probe(&pdev->dev, PTR_ERR(tdma->rst), 1109 "Missing controller reset\n"); 1110 return PTR_ERR(tdma->rst); 1111 } 1112 reset_control_reset(tdma->rst); 1113 = 1114 tdma->dma_dev.dev =3D &pdev->dev; 1115 = 1116 iommu_spec =3D dev_iommu_fwspec_get(&pdev->dev); 1117 if (!iommu_spec) { 1118 dev_err(&pdev->dev, "Missing iommu stream-id\n"); 1119 return -EINVAL; 1120 } > 1121 stream_id =3D iommu_spec->ids[0] & 0xffff; 1122 = 1123 INIT_LIST_HEAD(&tdma->dma_dev.channels); 1124 for (i =3D 0; i < cdata->nr_channels; i++) { 1125 struct tegra_dma_channel *tdc =3D &tdma->channels[i]; 1126 = 1127 tdc->chan_base_offset =3D TEGRA_GPCDMA_CHANNEL_BASE_ADD_OFFSET + 1128 i * cdata->channel_reg_size; 1129 res =3D platform_get_resource(pdev, IORESOURCE_IRQ, i); 1130 if (!res) { 1131 dev_err(&pdev->dev, "No irq resource for chan %d\n", i); 1132 return -EINVAL; 1133 } 1134 tdc->irq =3D res->start; 1135 snprintf(tdc->name, sizeof(tdc->name), "gpcdma.%d", i); 1136 = 1137 tdc->tdma =3D tdma; 1138 tdc->id =3D i; 1139 tdc->slave_id =3D -1; 1140 = 1141 vchan_init(&tdc->vc, &tdma->dma_dev); 1142 tdc->vc.desc_free =3D tegra_dma_desc_free; 1143 raw_spin_lock_init(&tdc->lock); 1144 = 1145 /* program stream-id for this channel */ 1146 tegra_dma_program_sid(tdc, i, stream_id); 1147 tdc->stream_id =3D stream_id; 1148 } 1149 = 1150 dma_cap_set(DMA_SLAVE, tdma->dma_dev.cap_mask); 1151 dma_cap_set(DMA_PRIVATE, tdma->dma_dev.cap_mask); 1152 dma_cap_set(DMA_MEMCPY, tdma->dma_dev.cap_mask); 1153 dma_cap_set(DMA_MEMSET, tdma->dma_dev.cap_mask); 1154 = 1155 /* 1156 * Only word aligned transfers are supported. Set the copy 1157 * alignment shift. 1158 */ 1159 tdma->dma_dev.copy_align =3D 2; 1160 tdma->dma_dev.fill_align =3D 2; 1161 tdma->dma_dev.device_alloc_chan_resources =3D 1162 tegra_dma_alloc_chan_resources; 1163 tdma->dma_dev.device_free_chan_resources =3D 1164 tegra_dma_free_chan_resources; 1165 tdma->dma_dev.device_prep_slave_sg =3D tegra_dma_prep_slave_sg; 1166 tdma->dma_dev.device_prep_dma_memcpy =3D tegra_dma_prep_dma_memcpy; 1167 tdma->dma_dev.device_prep_dma_memset =3D tegra_dma_prep_dma_memset; 1168 tdma->dma_dev.device_config =3D tegra_dma_slave_config; 1169 tdma->dma_dev.device_terminate_all =3D tegra_dma_terminate_all; 1170 tdma->dma_dev.device_tx_status =3D tegra_dma_tx_status; 1171 tdma->dma_dev.device_issue_pending =3D tegra_dma_issue_pending; 1172 tdma->dma_dev.device_synchronize =3D tegra_dma_chan_synchronize; 1173 tdma->dma_dev.residue_granularity =3D DMA_RESIDUE_GRANULARITY_BURST; 1174 = 1175 /* Register DMA channel interrupt handlers after everything is setu= p */ 1176 for (i =3D 0; i < cdata->nr_channels; i++) { 1177 struct tegra_dma_channel *tdc =3D &tdma->channels[i]; 1178 = 1179 ret =3D devm_request_irq(&pdev->dev, tdc->irq, 1180 tegra_dma_isr, 0, tdc->name, tdc); 1181 if (ret) { 1182 dev_err_probe(&pdev->dev, ret, 1183 "request_irq failed for channel %d\n", i); 1184 return ret; 1185 } 1186 } 1187 = 1188 ret =3D dma_async_device_register(&tdma->dma_dev); 1189 if (ret < 0) { 1190 dev_err_probe(&pdev->dev, ret, 1191 "GPC DMA driver registration failed\n"); 1192 return ret; 1193 } 1194 = 1195 ret =3D of_dma_controller_register(pdev->dev.of_node, 1196 tegra_dma_of_xlate, tdma); 1197 if (ret < 0) { 1198 dev_err_probe(&pdev->dev, ret, 1199 "GPC DMA OF registration failed\n"); 1200 = 1201 dma_async_device_unregister(&tdma->dma_dev); 1202 return ret; 1203 } 1204 = 1205 dev_info(&pdev->dev, "GPC DMA driver register %d channels\n", 1206 cdata->nr_channels); 1207 = 1208 return 0; 1209 } 1210 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============6311145862917286354==--