* [sashal-linux-stable:queue-5.4 220/402] drivers/infiniband/hw/efa/efa_verbs.c:1451:20: error: implicit declaration of function 'ib_umem_num_dma_blocks'; did you mean
@ 2020-10-26 10:19 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-10-26 10:19 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5026 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 6aea8cab73778ca67fa373a802481d0329cd4b9b
commit: 39a52745de943c72c9ce7488cef9e3cafe962d31 [220/402] RDMA/efa: Use ib_umem_num_dma_pages()
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/commit/?id=39a52745de943c72c9ce7488cef9e3cafe962d31
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 39a52745de943c72c9ce7488cef9e3cafe962d31
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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/infiniband/hw/efa/efa_verbs.c: In function 'efa_reg_mr':
>> drivers/infiniband/hw/efa/efa_verbs.c:1451:20: error: implicit declaration of function 'ib_umem_num_dma_blocks'; did you mean 'ib_umem_num_pages'? [-Werror=implicit-function-declaration]
1451 | params.page_num = ib_umem_num_dma_blocks(mr->umem, pg_sz);
| ^~~~~~~~~~~~~~~~~~~~~~
| ib_umem_num_pages
cc1: some warnings being treated as errors
vim +1451 drivers/infiniband/hw/efa/efa_verbs.c
1391
1392 struct ib_mr *efa_reg_mr(struct ib_pd *ibpd, u64 start, u64 length,
1393 u64 virt_addr, int access_flags,
1394 struct ib_udata *udata)
1395 {
1396 struct efa_dev *dev = to_edev(ibpd->device);
1397 struct efa_com_reg_mr_params params = {};
1398 struct efa_com_reg_mr_result result = {};
1399 struct pbl_context pbl;
1400 unsigned int pg_sz;
1401 struct efa_mr *mr;
1402 int inline_size;
1403 int err;
1404
1405 if (udata->inlen &&
1406 !ib_is_udata_cleared(udata, 0, sizeof(udata->inlen))) {
1407 ibdev_dbg(&dev->ibdev,
1408 "Incompatible ABI params, udata not cleared\n");
1409 err = -EINVAL;
1410 goto err_out;
1411 }
1412
1413 if (access_flags & ~EFA_SUPPORTED_ACCESS_FLAGS) {
1414 ibdev_dbg(&dev->ibdev,
1415 "Unsupported access flags[%#x], supported[%#x]\n",
1416 access_flags, EFA_SUPPORTED_ACCESS_FLAGS);
1417 err = -EOPNOTSUPP;
1418 goto err_out;
1419 }
1420
1421 mr = kzalloc(sizeof(*mr), GFP_KERNEL);
1422 if (!mr) {
1423 err = -ENOMEM;
1424 goto err_out;
1425 }
1426
1427 mr->umem = ib_umem_get(udata, start, length, access_flags, 0);
1428 if (IS_ERR(mr->umem)) {
1429 err = PTR_ERR(mr->umem);
1430 ibdev_dbg(&dev->ibdev,
1431 "Failed to pin and map user space memory[%d]\n", err);
1432 goto err_free;
1433 }
1434
1435 params.pd = to_epd(ibpd)->pdn;
1436 params.iova = virt_addr;
1437 params.mr_length_in_bytes = length;
1438 params.permissions = access_flags & 0x1;
1439
1440 pg_sz = ib_umem_find_best_pgsz(mr->umem,
1441 dev->dev_attr.page_size_cap,
1442 virt_addr);
1443 if (!pg_sz) {
1444 err = -EOPNOTSUPP;
1445 ibdev_dbg(&dev->ibdev, "Failed to find a suitable page size in page_size_cap %#llx\n",
1446 dev->dev_attr.page_size_cap);
1447 goto err_unmap;
1448 }
1449
1450 params.page_shift = order_base_2(pg_sz);
> 1451 params.page_num = ib_umem_num_dma_blocks(mr->umem, pg_sz);
1452
1453 ibdev_dbg(&dev->ibdev,
1454 "start %#llx length %#llx params.page_shift %u params.page_num %u\n",
1455 start, length, params.page_shift, params.page_num);
1456
1457 inline_size = ARRAY_SIZE(params.pbl.inline_pbl_array);
1458 if (params.page_num <= inline_size) {
1459 err = efa_create_inline_pbl(dev, mr, ¶ms);
1460 if (err)
1461 goto err_unmap;
1462
1463 err = efa_com_register_mr(&dev->edev, ¶ms, &result);
1464 if (err)
1465 goto err_unmap;
1466 } else {
1467 err = efa_create_pbl(dev, &pbl, mr, ¶ms);
1468 if (err)
1469 goto err_unmap;
1470
1471 err = efa_com_register_mr(&dev->edev, ¶ms, &result);
1472 pbl_destroy(dev, &pbl);
1473
1474 if (err)
1475 goto err_unmap;
1476 }
1477
1478 mr->ibmr.lkey = result.l_key;
1479 mr->ibmr.rkey = result.r_key;
1480 mr->ibmr.length = length;
1481 ibdev_dbg(&dev->ibdev, "Registered mr[%d]\n", mr->ibmr.lkey);
1482
1483 return &mr->ibmr;
1484
1485 err_unmap:
1486 ib_umem_release(mr->umem);
1487 err_free:
1488 kfree(mr);
1489 err_out:
1490 atomic64_inc(&dev->stats.sw_stats.reg_mr_err);
1491 return ERR_PTR(err);
1492 }
1493
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 70887 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-26 10:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 10:19 [sashal-linux-stable:queue-5.4 220/402] drivers/infiniband/hw/efa/efa_verbs.c:1451:20: error: implicit declaration of function 'ib_umem_num_dma_blocks'; did you mean 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.