All of lore.kernel.org
 help / color / mirror / Atom feed
* [kbusch:dma-register 4/4] io_uring/rsrc.c:1242:12: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
@ 2022-07-19 23:31 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-07-19 23:31 UTC (permalink / raw)
  To: Keith Busch; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git dma-register
head:   9de6909fed20955193275bbf9c75ccc85553b7d8
commit: 9de6909fed20955193275bbf9c75ccc85553b7d8 [4/4] dma-prereg: add memory cleanup
config: openrisc-randconfig-r032-20220718 (https://download.01.org/0day-ci/archive/20220720/202207200749.b8XeMpQ8-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git/commit/?id=9de6909fed20955193275bbf9c75ccc85553b7d8
        git remote add kbusch https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git
        git fetch --no-tags kbusch dma-register
        git checkout 9de6909fed20955193275bbf9c75ccc85553b7d8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=openrisc SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   io_uring/rsrc.c: In function 'io_sqe_buffer_register':
>> io_uring/rsrc.c:1242:12: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
    1242 |         imu->dma_tag = 0;
         |            ^~
   io_uring/rsrc.c: In function 'io_import_fixed':
   io_uring/rsrc.c:1337:16: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
    1337 |         if (imu->dma_tag) {
         |                ^~
   io_uring/rsrc.c:1340:49: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
    1340 |                 iov_iter_dma_tag(iter, ddir, imu->dma_tag, offset, nr_segs, len);
         |                                                 ^~


vim +1242 io_uring/rsrc.c

129ce6a148558b Jens Axboe     2022-06-13  1192  
129ce6a148558b Jens Axboe     2022-06-13  1193  static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov,
129ce6a148558b Jens Axboe     2022-06-13  1194  				  struct io_mapped_ubuf **pimu,
129ce6a148558b Jens Axboe     2022-06-13  1195  				  struct page **last_hpage)
129ce6a148558b Jens Axboe     2022-06-13  1196  {
129ce6a148558b Jens Axboe     2022-06-13  1197  	struct io_mapped_ubuf *imu = NULL;
129ce6a148558b Jens Axboe     2022-06-13  1198  	struct page **pages = NULL;
129ce6a148558b Jens Axboe     2022-06-13  1199  	unsigned long off;
129ce6a148558b Jens Axboe     2022-06-13  1200  	size_t size;
129ce6a148558b Jens Axboe     2022-06-13  1201  	int ret, nr_pages, i;
129ce6a148558b Jens Axboe     2022-06-13  1202  
129ce6a148558b Jens Axboe     2022-06-13  1203  	*pimu = ctx->dummy_ubuf;
faee7b38d3c3e4 Pavel Begunkov 2022-06-15  1204  	if (!iov->iov_base)
129ce6a148558b Jens Axboe     2022-06-13  1205  		return 0;
129ce6a148558b Jens Axboe     2022-06-13  1206  
129ce6a148558b Jens Axboe     2022-06-13  1207  	ret = -ENOMEM;
129ce6a148558b Jens Axboe     2022-06-13  1208  	pages = io_pin_pages((unsigned long) iov->iov_base, iov->iov_len,
129ce6a148558b Jens Axboe     2022-06-13  1209  				&nr_pages);
129ce6a148558b Jens Axboe     2022-06-13  1210  	if (IS_ERR(pages)) {
129ce6a148558b Jens Axboe     2022-06-13  1211  		ret = PTR_ERR(pages);
129ce6a148558b Jens Axboe     2022-06-13  1212  		pages = NULL;
129ce6a148558b Jens Axboe     2022-06-13  1213  		goto done;
129ce6a148558b Jens Axboe     2022-06-13  1214  	}
129ce6a148558b Jens Axboe     2022-06-13  1215  
129ce6a148558b Jens Axboe     2022-06-13  1216  	imu = kvmalloc(struct_size(imu, bvec, nr_pages), GFP_KERNEL);
129ce6a148558b Jens Axboe     2022-06-13  1217  	if (!imu)
129ce6a148558b Jens Axboe     2022-06-13  1218  		goto done;
129ce6a148558b Jens Axboe     2022-06-13  1219  
129ce6a148558b Jens Axboe     2022-06-13  1220  	ret = io_buffer_account_pin(ctx, pages, nr_pages, imu, last_hpage);
129ce6a148558b Jens Axboe     2022-06-13  1221  	if (ret) {
129ce6a148558b Jens Axboe     2022-06-13  1222  		unpin_user_pages(pages, nr_pages);
129ce6a148558b Jens Axboe     2022-06-13  1223  		goto done;
129ce6a148558b Jens Axboe     2022-06-13  1224  	}
129ce6a148558b Jens Axboe     2022-06-13  1225  
129ce6a148558b Jens Axboe     2022-06-13  1226  	off = (unsigned long) iov->iov_base & ~PAGE_MASK;
129ce6a148558b Jens Axboe     2022-06-13  1227  	size = iov->iov_len;
129ce6a148558b Jens Axboe     2022-06-13  1228  	for (i = 0; i < nr_pages; i++) {
129ce6a148558b Jens Axboe     2022-06-13  1229  		size_t vec_len;
129ce6a148558b Jens Axboe     2022-06-13  1230  
129ce6a148558b Jens Axboe     2022-06-13  1231  		vec_len = min_t(size_t, size, PAGE_SIZE - off);
129ce6a148558b Jens Axboe     2022-06-13  1232  		imu->bvec[i].bv_page = pages[i];
129ce6a148558b Jens Axboe     2022-06-13  1233  		imu->bvec[i].bv_len = vec_len;
129ce6a148558b Jens Axboe     2022-06-13  1234  		imu->bvec[i].bv_offset = off;
129ce6a148558b Jens Axboe     2022-06-13  1235  		off = 0;
129ce6a148558b Jens Axboe     2022-06-13  1236  		size -= vec_len;
129ce6a148558b Jens Axboe     2022-06-13  1237  	}
129ce6a148558b Jens Axboe     2022-06-13  1238  	/* store original address for later verification */
129ce6a148558b Jens Axboe     2022-06-13  1239  	imu->ubuf = (unsigned long) iov->iov_base;
129ce6a148558b Jens Axboe     2022-06-13  1240  	imu->ubuf_end = imu->ubuf + iov->iov_len;
129ce6a148558b Jens Axboe     2022-06-13  1241  	imu->nr_bvecs = nr_pages;
8c38d1fa715ef4 Keith Busch    2022-07-18 @1242  	imu->dma_tag = 0;
129ce6a148558b Jens Axboe     2022-06-13  1243  	*pimu = imu;
129ce6a148558b Jens Axboe     2022-06-13  1244  	ret = 0;
129ce6a148558b Jens Axboe     2022-06-13  1245  done:
129ce6a148558b Jens Axboe     2022-06-13  1246  	if (ret)
129ce6a148558b Jens Axboe     2022-06-13  1247  		kvfree(imu);
129ce6a148558b Jens Axboe     2022-06-13  1248  	kvfree(pages);
129ce6a148558b Jens Axboe     2022-06-13  1249  	return ret;
129ce6a148558b Jens Axboe     2022-06-13  1250  }
129ce6a148558b Jens Axboe     2022-06-13  1251  

:::::: The code at line 1242 was first introduced by commit
:::::: 8c38d1fa715ef4cd8c42a27cd252e66f99a440a3 iouring/block/nvme: preregister dma mapped buffers

:::::: TO: Keith Busch <kbusch@kernel.org>
:::::: CC: Keith Busch <kbusch@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [kbusch:dma-register 4/4] io_uring/rsrc.c:1242:12: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
@ 2022-07-19 23:52 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-07-19 23:52 UTC (permalink / raw)
  To: Keith Busch; +Cc: kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git dma-register
head:   9de6909fed20955193275bbf9c75ccc85553b7d8
commit: 9de6909fed20955193275bbf9c75ccc85553b7d8 [4/4] dma-prereg: add memory cleanup
config: ia64-randconfig-r002-20220718 (https://download.01.org/0day-ci/archive/20220720/202207200735.6oYEZqYq-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 12.1.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://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git/commit/?id=9de6909fed20955193275bbf9c75ccc85553b7d8
        git remote add kbusch https://git.kernel.org/pub/scm/linux/kernel/git/kbusch/linux.git
        git fetch --no-tags kbusch dma-register
        git checkout 9de6909fed20955193275bbf9c75ccc85553b7d8
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from arch/ia64/include/asm/pgtable.h:153,
                    from include/linux/pgtable.h:6,
                    from arch/ia64/include/asm/uaccess.h:40,
                    from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from io_uring/rsrc.c:4:
   arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
   arch/ia64/include/asm/mmu_context.h:127:48: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
     127 |         unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
         |                                                ^~~~~~~
   io_uring/rsrc.c: In function 'io_sqe_buffer_register':
>> io_uring/rsrc.c:1242:12: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
    1242 |         imu->dma_tag = 0;
         |            ^~
   io_uring/rsrc.c: In function 'io_import_fixed':
   io_uring/rsrc.c:1337:16: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
    1337 |         if (imu->dma_tag) {
         |                ^~
   io_uring/rsrc.c:1340:49: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
    1340 |                 iov_iter_dma_tag(iter, ddir, imu->dma_tag, offset, nr_segs, len);
         |                                                 ^~


vim +1242 io_uring/rsrc.c

129ce6a148558b Jens Axboe     2022-06-13  1192  
129ce6a148558b Jens Axboe     2022-06-13  1193  static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov,
129ce6a148558b Jens Axboe     2022-06-13  1194  				  struct io_mapped_ubuf **pimu,
129ce6a148558b Jens Axboe     2022-06-13  1195  				  struct page **last_hpage)
129ce6a148558b Jens Axboe     2022-06-13  1196  {
129ce6a148558b Jens Axboe     2022-06-13  1197  	struct io_mapped_ubuf *imu = NULL;
129ce6a148558b Jens Axboe     2022-06-13  1198  	struct page **pages = NULL;
129ce6a148558b Jens Axboe     2022-06-13  1199  	unsigned long off;
129ce6a148558b Jens Axboe     2022-06-13  1200  	size_t size;
129ce6a148558b Jens Axboe     2022-06-13  1201  	int ret, nr_pages, i;
129ce6a148558b Jens Axboe     2022-06-13  1202  
129ce6a148558b Jens Axboe     2022-06-13  1203  	*pimu = ctx->dummy_ubuf;
faee7b38d3c3e4 Pavel Begunkov 2022-06-15  1204  	if (!iov->iov_base)
129ce6a148558b Jens Axboe     2022-06-13  1205  		return 0;
129ce6a148558b Jens Axboe     2022-06-13  1206  
129ce6a148558b Jens Axboe     2022-06-13  1207  	ret = -ENOMEM;
129ce6a148558b Jens Axboe     2022-06-13  1208  	pages = io_pin_pages((unsigned long) iov->iov_base, iov->iov_len,
129ce6a148558b Jens Axboe     2022-06-13  1209  				&nr_pages);
129ce6a148558b Jens Axboe     2022-06-13  1210  	if (IS_ERR(pages)) {
129ce6a148558b Jens Axboe     2022-06-13  1211  		ret = PTR_ERR(pages);
129ce6a148558b Jens Axboe     2022-06-13  1212  		pages = NULL;
129ce6a148558b Jens Axboe     2022-06-13  1213  		goto done;
129ce6a148558b Jens Axboe     2022-06-13  1214  	}
129ce6a148558b Jens Axboe     2022-06-13  1215  
129ce6a148558b Jens Axboe     2022-06-13  1216  	imu = kvmalloc(struct_size(imu, bvec, nr_pages), GFP_KERNEL);
129ce6a148558b Jens Axboe     2022-06-13  1217  	if (!imu)
129ce6a148558b Jens Axboe     2022-06-13  1218  		goto done;
129ce6a148558b Jens Axboe     2022-06-13  1219  
129ce6a148558b Jens Axboe     2022-06-13  1220  	ret = io_buffer_account_pin(ctx, pages, nr_pages, imu, last_hpage);
129ce6a148558b Jens Axboe     2022-06-13  1221  	if (ret) {
129ce6a148558b Jens Axboe     2022-06-13  1222  		unpin_user_pages(pages, nr_pages);
129ce6a148558b Jens Axboe     2022-06-13  1223  		goto done;
129ce6a148558b Jens Axboe     2022-06-13  1224  	}
129ce6a148558b Jens Axboe     2022-06-13  1225  
129ce6a148558b Jens Axboe     2022-06-13  1226  	off = (unsigned long) iov->iov_base & ~PAGE_MASK;
129ce6a148558b Jens Axboe     2022-06-13  1227  	size = iov->iov_len;
129ce6a148558b Jens Axboe     2022-06-13  1228  	for (i = 0; i < nr_pages; i++) {
129ce6a148558b Jens Axboe     2022-06-13  1229  		size_t vec_len;
129ce6a148558b Jens Axboe     2022-06-13  1230  
129ce6a148558b Jens Axboe     2022-06-13  1231  		vec_len = min_t(size_t, size, PAGE_SIZE - off);
129ce6a148558b Jens Axboe     2022-06-13  1232  		imu->bvec[i].bv_page = pages[i];
129ce6a148558b Jens Axboe     2022-06-13  1233  		imu->bvec[i].bv_len = vec_len;
129ce6a148558b Jens Axboe     2022-06-13  1234  		imu->bvec[i].bv_offset = off;
129ce6a148558b Jens Axboe     2022-06-13  1235  		off = 0;
129ce6a148558b Jens Axboe     2022-06-13  1236  		size -= vec_len;
129ce6a148558b Jens Axboe     2022-06-13  1237  	}
129ce6a148558b Jens Axboe     2022-06-13  1238  	/* store original address for later verification */
129ce6a148558b Jens Axboe     2022-06-13  1239  	imu->ubuf = (unsigned long) iov->iov_base;
129ce6a148558b Jens Axboe     2022-06-13  1240  	imu->ubuf_end = imu->ubuf + iov->iov_len;
129ce6a148558b Jens Axboe     2022-06-13  1241  	imu->nr_bvecs = nr_pages;
8c38d1fa715ef4 Keith Busch    2022-07-18 @1242  	imu->dma_tag = 0;
129ce6a148558b Jens Axboe     2022-06-13  1243  	*pimu = imu;
129ce6a148558b Jens Axboe     2022-06-13  1244  	ret = 0;
129ce6a148558b Jens Axboe     2022-06-13  1245  done:
129ce6a148558b Jens Axboe     2022-06-13  1246  	if (ret)
129ce6a148558b Jens Axboe     2022-06-13  1247  		kvfree(imu);
129ce6a148558b Jens Axboe     2022-06-13  1248  	kvfree(pages);
129ce6a148558b Jens Axboe     2022-06-13  1249  	return ret;
129ce6a148558b Jens Axboe     2022-06-13  1250  }
129ce6a148558b Jens Axboe     2022-06-13  1251  

:::::: The code at line 1242 was first introduced by commit
:::::: 8c38d1fa715ef4cd8c42a27cd252e66f99a440a3 iouring/block/nvme: preregister dma mapped buffers

:::::: TO: Keith Busch <kbusch@kernel.org>
:::::: CC: Keith Busch <kbusch@kernel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-19 23:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19 23:31 [kbusch:dma-register 4/4] io_uring/rsrc.c:1242:12: error: 'struct io_mapped_ubuf' has no member named 'dma_tag' kernel test robot
2022-07-19 23:52 kernel test robot

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.