Content-Type: multipart/mixed; boundary="===============4327041543054812274==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 9/9] iommu: Move flush queue data into iommu_dma_cookie Date: Wed, 24 Nov 2021 06:40:15 +0800 Message-ID: <202111240645.30neUyaq-lkp@intel.com> In-Reply-To: <49bfd9636fd21c4b40e07558db6bfbbf82a449ac.1637674723.git.robin.murphy@arm.com> List-Id: --===============4327041543054812274== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Robin, I love your patch! Perhaps something to improve: [auto build test WARNING on joro-iommu/next] [also build test WARNING on v5.16-rc2 next-20211123] [cannot apply to tegra-drm/drm/tegra/for-next] [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/Robin-Murphy/iommu-Refacto= r-flush-queues-into-iommu-dma/20211123-221220 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next config: arm-defconfig (https://download.01.org/0day-ci/archive/20211124/202= 111240645.30neUyaq-lkp(a)intel.com/config.gz) compiler: arm-linux-gnueabi-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/d4623bb02366503fa7c380522= 8fa9534c9490d20 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Robin-Murphy/iommu-Refactor-flush-= queues-into-iommu-dma/20211123-221220 git checkout d4623bb02366503fa7c3805228fa9534c9490d20 # save the config file to linux build tree COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= ARCH=3Darm = If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/gpu/drm/tegra/vic.c: In function 'vic_exit': drivers/gpu/drm/tegra/vic.c:196:17: error: implicit declaration of funct= ion 'dma_unmap_single'; did you mean 'mount_single'? [-Werror=3Dimplicit-fu= nction-declaration] 196 | dma_unmap_single(vic->dev, vic->falcon.firmware.= phys, | ^~~~~~~~~~~~~~~~ | mount_single drivers/gpu/drm/tegra/vic.c:197:61: error: 'DMA_TO_DEVICE' undeclared (f= irst use in this function); did you mean 'MT_DEVICE'? 197 | vic->falcon.firmware.size, DMA_= TO_DEVICE); | ^~~~= ~~~~~~~~~ | MT_D= EVICE drivers/gpu/drm/tegra/vic.c:197:61: note: each undeclared identifier is = reported only once for each function it appears in drivers/gpu/drm/tegra/vic.c:202:17: error: implicit declaration of funct= ion 'dma_free_coherent' [-Werror=3Dimplicit-function-declaration] 202 | dma_free_coherent(vic->dev, vic->falcon.firmware= .size, | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/vic.c: In function 'vic_load_firmware': drivers/gpu/drm/tegra/vic.c:234:24: error: implicit declaration of funct= ion 'dma_alloc_coherent' [-Werror=3Dimplicit-function-declaration] 234 | virt =3D dma_alloc_coherent(vic->dev, size, &iov= a, GFP_KERNEL); | ^~~~~~~~~~~~~~~~~~ >> drivers/gpu/drm/tegra/vic.c:234:22: warning: assignment to 'void *' from= 'int' makes pointer from integer without a cast [-Wint-conversion] 234 | virt =3D dma_alloc_coherent(vic->dev, size, &iov= a, GFP_KERNEL); | ^ drivers/gpu/drm/tegra/vic.c:236:23: error: implicit declaration of funct= ion 'dma_mapping_error' [-Werror=3Dimplicit-function-declaration] 236 | err =3D dma_mapping_error(vic->dev, iova); | ^~~~~~~~~~~~~~~~~ drivers/gpu/drm/tegra/vic.c:258:24: error: implicit declaration of funct= ion 'dma_map_single' [-Werror=3Dimplicit-function-declaration] 258 | phys =3D dma_map_single(vic->dev, virt, size, DM= A_TO_DEVICE); | ^~~~~~~~~~~~~~ drivers/gpu/drm/tegra/vic.c:258:61: error: 'DMA_TO_DEVICE' undeclared (f= irst use in this function); did you mean 'MT_DEVICE'? 258 | phys =3D dma_map_single(vic->dev, virt, size, DM= A_TO_DEVICE); | ^~~~= ~~~~~~~~~ | MT_D= EVICE drivers/gpu/drm/tegra/vic.c: In function 'vic_probe': drivers/gpu/drm/tegra/vic.c:412:15: error: implicit declaration of funct= ion 'dma_coerce_mask_and_coherent' [-Werror=3Dimplicit-function-declaration] 412 | err =3D dma_coerce_mask_and_coherent(dev, *dev->parent->= dma_mask); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: some warnings being treated as errors vim +234 drivers/gpu/drm/tegra/vic.c 0ae797a8ba05a2 Arto Merilainen 2016-12-14 214 = 77a0b09dd993c8 Thierry Reding 2019-02-01 215 static int vic_load_firmwar= e(struct vic *vic) 77a0b09dd993c8 Thierry Reding 2019-02-01 216 { 20e7dce255e96a Thierry Reding 2019-10-28 217 struct host1x_client *clie= nt =3D &vic->client.base; 20e7dce255e96a Thierry Reding 2019-10-28 218 struct tegra_drm *tegra = =3D vic->client.drm; d972d624762805 Thierry Reding 2019-10-28 219 dma_addr_t iova; 20e7dce255e96a Thierry Reding 2019-10-28 220 size_t size; 20e7dce255e96a Thierry Reding 2019-10-28 221 void *virt; 77a0b09dd993c8 Thierry Reding 2019-02-01 222 int err; 77a0b09dd993c8 Thierry Reding 2019-02-01 223 = d972d624762805 Thierry Reding 2019-10-28 224 if (vic->falcon.firmware.v= irt) 77a0b09dd993c8 Thierry Reding 2019-02-01 225 return 0; 77a0b09dd993c8 Thierry Reding 2019-02-01 226 = 77a0b09dd993c8 Thierry Reding 2019-02-01 227 err =3D falcon_read_firmwa= re(&vic->falcon, vic->config->firmware); 77a0b09dd993c8 Thierry Reding 2019-02-01 228 if (err < 0) 20e7dce255e96a Thierry Reding 2019-10-28 229 return err; 20e7dce255e96a Thierry Reding 2019-10-28 230 = 20e7dce255e96a Thierry Reding 2019-10-28 231 size =3D vic->falcon.firmw= are.size; 20e7dce255e96a Thierry Reding 2019-10-28 232 = 20e7dce255e96a Thierry Reding 2019-10-28 233 if (!client->group) { d972d624762805 Thierry Reding 2019-10-28 @234 virt =3D dma_alloc_cohere= nt(vic->dev, size, &iova, GFP_KERNEL); 20e7dce255e96a Thierry Reding 2019-10-28 235 = d972d624762805 Thierry Reding 2019-10-28 236 err =3D dma_mapping_error= (vic->dev, iova); 20e7dce255e96a Thierry Reding 2019-10-28 237 if (err < 0) 20e7dce255e96a Thierry Reding 2019-10-28 238 return err; 20e7dce255e96a Thierry Reding 2019-10-28 239 } else { d972d624762805 Thierry Reding 2019-10-28 240 virt =3D tegra_drm_alloc(= tegra, size, &iova); 20e7dce255e96a Thierry Reding 2019-10-28 241 } 20e7dce255e96a Thierry Reding 2019-10-28 242 = d972d624762805 Thierry Reding 2019-10-28 243 vic->falcon.firmware.virt = =3D virt; d972d624762805 Thierry Reding 2019-10-28 244 vic->falcon.firmware.iova = =3D iova; 77a0b09dd993c8 Thierry Reding 2019-02-01 245 = 77a0b09dd993c8 Thierry Reding 2019-02-01 246 err =3D falcon_load_firmwa= re(&vic->falcon); 77a0b09dd993c8 Thierry Reding 2019-02-01 247 if (err < 0) 77a0b09dd993c8 Thierry Reding 2019-02-01 248 goto cleanup; 77a0b09dd993c8 Thierry Reding 2019-02-01 249 = 20e7dce255e96a Thierry Reding 2019-10-28 250 /* 20e7dce255e96a Thierry Reding 2019-10-28 251 * In this case we have re= ceived an IOVA from the shared domain, so we 20e7dce255e96a Thierry Reding 2019-10-28 252 * need to make sure to ge= t the physical address so that the DMA API 20e7dce255e96a Thierry Reding 2019-10-28 253 * knows what memory pages= to flush the cache for. 20e7dce255e96a Thierry Reding 2019-10-28 254 */ 20e7dce255e96a Thierry Reding 2019-10-28 255 if (client->group) { d972d624762805 Thierry Reding 2019-10-28 256 dma_addr_t phys; d972d624762805 Thierry Reding 2019-10-28 257 = 20e7dce255e96a Thierry Reding 2019-10-28 258 phys =3D dma_map_single(v= ic->dev, virt, size, DMA_TO_DEVICE); 20e7dce255e96a Thierry Reding 2019-10-28 259 = 20e7dce255e96a Thierry Reding 2019-10-28 260 err =3D dma_mapping_error= (vic->dev, phys); 20e7dce255e96a Thierry Reding 2019-10-28 261 if (err < 0) 20e7dce255e96a Thierry Reding 2019-10-28 262 goto cleanup; 20e7dce255e96a Thierry Reding 2019-10-28 263 = d972d624762805 Thierry Reding 2019-10-28 264 vic->falcon.firmware.phys= =3D phys; 20e7dce255e96a Thierry Reding 2019-10-28 265 } 20e7dce255e96a Thierry Reding 2019-10-28 266 = 77a0b09dd993c8 Thierry Reding 2019-02-01 267 return 0; 77a0b09dd993c8 Thierry Reding 2019-02-01 268 = 77a0b09dd993c8 Thierry Reding 2019-02-01 269 cleanup: 20e7dce255e96a Thierry Reding 2019-10-28 270 if (!client->group) d972d624762805 Thierry Reding 2019-10-28 271 dma_free_coherent(vic->de= v, size, virt, iova); 20e7dce255e96a Thierry Reding 2019-10-28 272 else d972d624762805 Thierry Reding 2019-10-28 273 tegra_drm_free(tegra, siz= e, virt, iova); 20e7dce255e96a Thierry Reding 2019-10-28 274 = 77a0b09dd993c8 Thierry Reding 2019-02-01 275 return err; 77a0b09dd993c8 Thierry Reding 2019-02-01 276 } 77a0b09dd993c8 Thierry Reding 2019-02-01 277 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============4327041543054812274==--