lkml.org 
[lkml]   [2022]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[kbusch:dma-register 4/4] io_uring/rsrc.c:1242:12: error: 'struct io_mapped_ubuf' has no member named 'dma_tag'
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

\
 
 \ /
  Last update: 2022-07-20 01:33    [W:0.079 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site