mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Logan Gunthorpe <logang@deltatee.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: [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'?
Date: Thu, 7 Jul 2022 12:15:32 +0800	[thread overview]
Message-ID: <202207071221.UPqIJ9mF-lkp@intel.com> (raw)

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

                 reply	other threads:[~2022-07-07  4:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202207071221.UPqIJ9mF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=logang@deltatee.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®