All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Leon Romanovsky <leonro@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [leon-rdma:dma-split-wip 11/26] mm/hmm.c:642:17: error: 'struct device' has no member named 'dma_skip_sync'
Date: Wed, 23 Oct 2024 09:12:20 +0800	[thread overview]
Message-ID: <202410230904.pPSwIFSx-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git dma-split-wip
head:   c651d2118e26e1ac43db75c53cc4b4a51c41984b
commit: 8beafe484c79bce5de4807d390d93250449fecee [11/26] mm/hmm: generalize managing PFN and DMA lists
config: i386-randconfig-141-20241023 (https://download.01.org/0day-ci/archive/20241023/202410230904.pPSwIFSx-lkp@intel.com/config)
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/20241023/202410230904.pPSwIFSx-lkp@intel.com/reproduce)

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/202410230904.pPSwIFSx-lkp@intel.com/

All errors (new ones prefixed by >>):

   mm/hmm.c: In function 'hmm_map_alloc':
>> mm/hmm.c:642:17: error: 'struct device' has no member named 'dma_skip_sync'
     642 |         if (!dev->dma_skip_sync || dma_addressing_limited(dev))
         |                 ^~


vim +642 mm/hmm.c

   618	
   619	/**
   620	 * hmm_map_alloc - Allocate HMM map structure
   621	 * @dev: device to allocate structure for
   622	 * @map: HMM map to allocate
   623	 * @nr_entries: number of entries in the map
   624	 * @dma_entry_size: size of the DMA entry in the map
   625	 *
   626	 * Allocate the HMM map structure and all the lists it contains.
   627	 * Return 0 on success, -ENOMEM on failure.
   628	 */
   629	int hmm_map_alloc(struct device *dev, struct hmm_map *map, size_t nr_entries,
   630			  size_t dma_entry_size)
   631	{
   632		bool use_iova;
   633	
   634		if (!(nr_entries * PAGE_SIZE / dma_entry_size))
   635			return -EINVAL;
   636	
   637		/*
   638		 * The HMM API violates our normal DMA buffer ownership rules and can't
   639		 * transfer buffer ownership.  The dma_addressing_limited() check is a
   640		 * best approximation to ensure no swiotlb buffering happens.
   641		 */
 > 642		if (!dev->dma_skip_sync || dma_addressing_limited(dev))
   643			return -EOPNOTSUPP;
   644	
   645		map->dma_entry_size = dma_entry_size;
   646		map->pfn_list =
   647			kvcalloc(nr_entries, sizeof(*map->pfn_list), GFP_KERNEL);
   648		if (!map->pfn_list)
   649			return -ENOMEM;
   650	
   651		use_iova = dma_iova_try_alloc(dev, &map->state, 0,
   652				nr_entries * PAGE_SIZE);
   653		if (!use_iova && dma_need_unmap(dev)) {
   654			map->dma_list = kvcalloc(nr_entries, sizeof(*map->dma_list),
   655						 GFP_KERNEL);
   656			if (!map->dma_list)
   657				goto err_dma;
   658		}
   659		return 0;
   660	
   661	err_dma:
   662		kfree(map->pfn_list);
   663		return -ENOMEM;
   664	}
   665	EXPORT_SYMBOL_GPL(hmm_map_alloc);
   666	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2024-10-23  1:13 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=202410230904.pPSwIFSx-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=leonro@nvidia.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 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.