All of lore.kernel.org
 help / color / mirror / Atom feed
* [sbates130272-p2pmem:p2pdma_user_cmb_v8 7/21] drivers/iommu/iommu.c:2460:21: error: implicit declaration of function 'sg_is_dma_bus_address'; did you mean 'sg_dma_address'?
@ 2022-07-07  4:15 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-07-07  4:15 UTC (permalink / raw)
  To: Logan Gunthorpe; +Cc: kbuild-all, linux-kernel

tree:   https://github.com/sbates130272/linux-p2pmem.git p2pdma_user_cmb_v8
head:   a2dd359c3f1baca6c0438adec8900b7fe57f92af
commit: 34dbc33ec51c9e22ca9094054216d5e63d5cab08 [7/21] iommu: Explicitly skip bus address marked segments  in __iommu_map_sg()
config: xtensa-randconfig-r015-20220706 (https://download.01.org/0day-ci/archive/20220707/202207071221.UPqIJ9mF-lkp@intel.com/config)
compiler: xtensa-linux-gcc (GCC) 11.3.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://github.com/sbates130272/linux-p2pmem/commit/34dbc33ec51c9e22ca9094054216d5e63d5cab08
        git remote add sbates130272-p2pmem https://github.com/sbates130272/linux-p2pmem.git
        git fetch --no-tags sbates130272-p2pmem p2pdma_user_cmb_v8
        git checkout 34dbc33ec51c9e22ca9094054216d5e63d5cab08
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/iommu/

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 >>):

   drivers/iommu/iommu.c: In function '__iommu_map_sg':
>> drivers/iommu/iommu.c:2460:21: error: implicit declaration of function 'sg_is_dma_bus_address'; did you mean 'sg_dma_address'? [-Werror=implicit-function-declaration]
    2460 |                 if (sg_is_dma_bus_address(sg))
         |                     ^~~~~~~~~~~~~~~~~~~~~
         |                     sg_dma_address
   cc1: some warnings being treated as errors


vim +2460 drivers/iommu/iommu.c

  2435	
  2436	static ssize_t __iommu_map_sg(struct iommu_domain *domain, unsigned long iova,
  2437			struct scatterlist *sg, unsigned int nents, int prot,
  2438			gfp_t gfp)
  2439	{
  2440		const struct iommu_domain_ops *ops = domain->ops;
  2441		size_t len = 0, mapped = 0;
  2442		phys_addr_t start;
  2443		unsigned int i = 0;
  2444		int ret;
  2445	
  2446		while (i <= nents) {
  2447			phys_addr_t s_phys = sg_phys(sg);
  2448	
  2449			if (len && s_phys != start + len) {
  2450				ret = __iommu_map(domain, iova + mapped, start,
  2451						len, prot, gfp);
  2452	
  2453				if (ret)
  2454					goto out_err;
  2455	
  2456				mapped += len;
  2457				len = 0;
  2458			}
  2459	
> 2460			if (sg_is_dma_bus_address(sg))
  2461				goto next;
  2462	
  2463			if (len) {
  2464				len += sg->length;
  2465			} else {
  2466				len = sg->length;
  2467				start = s_phys;
  2468			}
  2469	
  2470	next:
  2471			if (++i < nents)
  2472				sg = sg_next(sg);
  2473		}
  2474	
  2475		if (ops->iotlb_sync_map)
  2476			ops->iotlb_sync_map(domain, iova, mapped);
  2477		return mapped;
  2478	
  2479	out_err:
  2480		/* undo mappings already done */
  2481		iommu_unmap(domain, iova, mapped);
  2482	
  2483		return ret;
  2484	}
  2485	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-07  4:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07  4:15 [sbates130272-p2pmem:p2pdma_user_cmb_v8 7/21] drivers/iommu/iommu.c:2460:21: error: implicit declaration of function 'sg_is_dma_bus_address'; did you mean 'sg_dma_address'? 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.