LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Stevens <stevensd@chromium.org>,
	Robin Murphy <robin.murphy@arm.com>
Cc: kbuild-all@lists.01.org, Christoph Hellwig <hch@lst.de>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
	Sergey Senozhatsky <senozhatsky@chromium.org>,
	Lu Baolu <baolu.lu@linux.intel.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	David Stevens <stevensd@chromium.org>
Subject: Re: [PATCH v2 3/9] dma-iommu: bounce buffers for untrusted devices
Date: Fri, 6 Aug 2021 23:53:07 +0800	[thread overview]
Message-ID: <202108062359.BT6qyO7X-lkp@intel.com> (raw)
In-Reply-To: <20210806103423.3341285-4-stevensd@google.com>

[-- Attachment #1: Type: text/plain, Size: 3693 bytes --]

Hi David,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on iommu/next]
[also build test WARNING on drm-intel/for-linux-next hch-configfs/for-next linus/master v5.14-rc4]
[cannot apply to next-20210805]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
config: ia64-randconfig-r025-20210804 (attached as .config)
compiler: ia64-linux-gcc (GCC) 10.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/0day-ci/linux/commit/c5f1f9fa88a7062c1ded50fa165f6b01ed73f161
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review David-Stevens/Add-dynamic-iommu-backed-bounce-buffers/20210806-183631
        git checkout c5f1f9fa88a7062c1ded50fa165f6b01ed73f161
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/iommu/io-buffer-manager.c:57:24: warning: no previous prototype for 'find_fallback_node' [-Wmissing-prototypes]
      57 | struct io_buffer_node *find_fallback_node(struct rb_root *root, dma_addr_t iova)
         |                        ^~~~~~~~~~~~~~~~~~
>> drivers/iommu/io-buffer-manager.c:75:6: warning: no previous prototype for 'insert_fallback_node' [-Wmissing-prototypes]
      75 | bool insert_fallback_node(struct rb_root *root, struct io_buffer_node *node)
         |      ^~~~~~~~~~~~~~~~~~~~


vim +/find_fallback_node +57 drivers/iommu/io-buffer-manager.c

    56	
  > 57	struct io_buffer_node *find_fallback_node(struct rb_root *root, dma_addr_t iova)
    58	{
    59		struct rb_node *node = root->rb_node;
    60	
    61		while (node) {
    62			struct io_buffer_node *cur =
    63				container_of(node, struct io_buffer_node, node);
    64	
    65			if (iova < cur->info.iova)
    66				node = node->rb_left;
    67			else if (iova >= cur->info.iova + cur->info.size)
    68				node = node->rb_right;
    69			else
    70				return cur;
    71		}
    72		return NULL;
    73	}
    74	
  > 75	bool insert_fallback_node(struct rb_root *root, struct io_buffer_node *node)
    76	{
    77		struct rb_node **new = &(root->rb_node), *parent = NULL;
    78		dma_addr_t node_end = node->info.iova + node->info.size;
    79	
    80		while (*new) {
    81			struct io_buffer_node *cur =
    82				container_of(*new, struct io_buffer_node, node);
    83			dma_addr_t cur_end = cur->info.iova + cur->info.size;
    84	
    85			parent = *new;
    86			if (node_end <= cur->info.iova)
    87				new = &((*new)->rb_left);
    88			else if (node->info.iova >= cur_end)
    89				new = &((*new)->rb_right);
    90			else {
    91				pr_crit("IOVA collision new=[%llx,%llx) old=[%llx,%llx)\n",
    92					node->info.iova, node_end, cur->info.iova,
    93					cur_end);
    94				return false;
    95			}
    96		}
    97	
    98		rb_link_node(&node->node, parent, new);
    99		rb_insert_color(&node->node, root);
   100		return true;
   101	}
   102	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36856 bytes --]

  reply	other threads:[~2021-08-06 15:53 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06 10:34 [PATCH v2 0/9] Add dynamic iommu backed bounce buffers David Stevens
2021-08-06 10:34 ` [PATCH v2 1/9] Revert "iommu: Allow the dma-iommu api to use bounce buffers" David Stevens
2021-08-06 10:34 ` [PATCH v2 2/9] dma-iommu: expose a few helper functions to module David Stevens
2021-08-06 17:28   ` kernel test robot
2021-08-06 10:34 ` [PATCH v2 3/9] dma-iommu: bounce buffers for untrusted devices David Stevens
2021-08-06 15:53   ` kernel test robot [this message]
2021-08-10  1:19   ` Mi, Dapeng1
2021-08-10  1:41     ` David Stevens
2021-08-06 10:34 ` [PATCH v2 4/9] dma-iommu: remove extra buffer search on unmap David Stevens
2021-08-06 10:34 ` [PATCH v2 5/9] dma-iommu: clear only necessary bytes David Stevens
2021-08-06 10:34 ` [PATCH v2 6/9] dma-iommu: add bounce buffer pools David Stevens
2021-08-06 10:34 ` [PATCH v2 7/9] dma-iommu: support iommu bounce buffer optimization David Stevens
2021-08-06 10:34 ` [PATCH v2 8/9] dma-mapping: add persistent streaming mapping flag David Stevens
2021-08-06 10:34 ` [PATCH v2 9/9] drm/i915: use DMA_ATTR_PERSISTENT_STREAMING flag David Stevens
2022-05-24 12:27 ` [PATCH v2 0/9] Add dynamic iommu backed bounce buffers Niklas Schnelle
2022-05-27  1:25   ` David Stevens
2022-06-03 14:53     ` Niklas Schnelle
2022-06-06  1:24       ` David Stevens
2022-07-01  9:23     ` Niklas Schnelle

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=202108062359.BT6qyO7X-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=baolu.lu@linux.intel.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=senozhatsky@chromium.org \
    --cc=stevensd@chromium.org \
    --cc=will@kernel.org \
    --subject='Re: [PATCH v2 3/9] dma-iommu: bounce buffers for untrusted devices' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).