[openeuler:OLK-6.6 2200/2200] drivers/vhost/vdpa.c:589:23: error: implicit declaration of function 'iommufd_ctx_from_fd'; did you mean 'iommufd_ctx_from_file'?

tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 9af1041f05d76435457d805d2d60c2aea1dc71f2 commit: 6a58b8be556fb7de52ae0272a994a1c73fffc903 [2200/2200] vhost/vdpa: Add support to bind and attach iommufd config: x86_64-buildonly-randconfig-006-20250506 (https://download.01.org/0day-ci/archive/20250507/202505070025.y1C68ZCV-lkp@i...) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250507/202505070025.y1C68ZCV-lkp@i...) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202505070025.y1C68ZCV-lkp@intel.com/ All error/warnings (new ones prefixed by >>): drivers/vhost/vdpa.c: In function 'vhost_vdpa_bind_iommufd':
drivers/vhost/vdpa.c:589:23: error: implicit declaration of function 'iommufd_ctx_from_fd'; did you mean 'iommufd_ctx_from_file'? [-Werror=implicit-function-declaration] 589 | iommufd_ctx = iommufd_ctx_from_fd(bind.iommufd); | ^~~~~~~~~~~~~~~~~~~ | iommufd_ctx_from_file drivers/vhost/vdpa.c:589:21: warning: assignment to 'struct iommufd_ctx *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 589 | iommufd_ctx = iommufd_ctx_from_fd(bind.iommufd); | ^ cc1: some warnings being treated as errors
Kconfig warnings: (for reference only) WARNING: unmet direct dependencies detected for PTP_1588_CLOCK Depends on [n]: NET [=y] && POSIX_TIMERS [=n] Selected by [y]: - SXE [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y] - SXE_VF [=y] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_LINKDATA [=y] && (X86 [=y] || ARM64) && PCI [=y] vim +589 drivers/vhost/vdpa.c 576 577 static long vhost_vdpa_bind_iommufd(struct vhost_vdpa *v, int __user *argp) 578 { 579 struct vhost_vdpa_bind_iommufd bind; 580 struct iommufd_ctx *iommufd_ctx; 581 struct iommufd_device *idev; 582 struct device *dma_dev = vdpa_get_dma_dev(v->vdpa); 583 struct iommu_group *iommu_group = iommu_group_get(dma_dev); 584 int ret = 0; 585 586 if (copy_from_user(&bind, argp, sizeof(bind))) 587 return -EFAULT; 588
589 iommufd_ctx = iommufd_ctx_from_fd(bind.iommufd); 590 if (IS_ERR(iommufd_ctx)) 591 return PTR_ERR(iommufd_ctx); 592 593 if (v->domain) { 594 iommu_detach_device(v->domain, dma_dev); 595 iommu_domain_free(v->domain); 596 v->domain = NULL; 597 } 598 599 /** 600 * Default iommu domain is created when vdpa device driver probes. 601 * Unuse default domain first to avoid failure when claiming dma owner. 602 */ 603 if (dma_dev->bus && dma_dev->bus->dma_cleanup) 604 dma_dev->bus->dma_cleanup(dma_dev); 605 ret = iommu_group_claim_dma_owner(iommu_group, iommufd_ctx); 606 if (ret) 607 goto dma_configure; 608 609 idev = iommufd_device_bind(iommufd_ctx, dma_dev, &bind.out_devid); 610 if (IS_ERR(idev)) { 611 ret = PTR_ERR(idev); 612 goto release_owner; 613 } 614 v->iommufd_dev = idev; 615 616 if (copy_to_user(argp, &bind, sizeof(bind))) { 617 ret = -EFAULT; 618 goto unbind; 619 } 620 621 goto out; 622 623 unbind: 624 iommufd_device_unbind(v->iommufd_dev); 625 v->iommufd_dev = NULL; 626 release_owner: 627 iommu_group_release_dma_owner(iommu_group); 628 dma_configure: 629 if (dma_dev->bus && dma_dev->bus->dma_configure) 630 dma_dev->bus->dma_configure(dma_dev); 631 out: 632 iommufd_ctx_put(iommufd_ctx); 633 return ret; 634 } 635
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
participants (1)
-
kernel test robot