linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Tom Murphy <murphyt7@tcd.ie>
Cc: Heiko Stuebner <heiko@sntech.de>,
	kvm@vger.kernel.org, David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-tegra@vger.kernel.org, Julien Grall <julien.grall@arm.com>,
	Will Deacon <will@kernel.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>,
	linux-samsung-soc@vger.kernel.org, Marc Zyngier <maz@kernel.org>,
	Joerg Roedel <joro@8bytes.org>,
	iommu@lists.linux-foundation.org,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	linux-rockchip@lists.infradead.org,
	Andy Gross <agross@kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	Eric Auger <eric.auger@redhat.com>,
	linux-mediatek@lists.infradead.org,
	Matthias Brugger <matthias.bgg@gmail.com>
Subject: Re: [PATCH 6/8] iommu: allow the dma-iommu api to use bounce buffers
Date: Tue, 24 Dec 2019 18:20:41 +0800	[thread overview]
Message-ID: <201912241851.JzKAAEXa%lkp@intel.com> (raw)
In-Reply-To: <20191221150402.13868-7-murphyt7@tcd.ie>

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

Hi Tom,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on rockchip/for-next]
[cannot apply to iommu/next tegra/for-next vfio/next linus/master v5.5-rc3 next-20191219]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Tom-Murphy/Convert-the-intel-iommu-driver-to-the-dma-iommu-api/20191224-171249
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git for-next
config: x86_64-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

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

All warnings (new ones prefixed by >>):

   drivers//iommu/dma-iommu.c: In function '__iommu_dma_map':
>> drivers//iommu/dma-iommu.c:568:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
      void *padding_start = phys_to_virt(phys);
      ^~~~

vim +568 drivers//iommu/dma-iommu.c

   537	
   538	static dma_addr_t __iommu_dma_map(struct device *dev, phys_addr_t phys,
   539			size_t org_size, dma_addr_t dma_mask, bool coherent,
   540			enum dma_data_direction dir, unsigned long attrs)
   541	{
   542		int prot = dma_info_to_prot(dir, coherent, attrs);
   543		struct iommu_domain *domain = iommu_get_dma_domain(dev);
   544		struct iommu_dma_cookie *cookie = domain->iova_cookie;
   545		struct iova_domain *iovad = &cookie->iovad;
   546		size_t iova_off = iova_offset(iovad, phys);
   547		size_t aligned_size = iova_align(iovad, org_size + iova_off);
   548		dma_addr_t iova;
   549	
   550		if (unlikely(iommu_dma_deferred_attach(dev, domain)))
   551			return DMA_MAPPING_ERROR;
   552	
   553	#ifdef CONFIG_SWIOTLB
   554		/*
   555		 * If both the physical buffer start address and size are
   556		 * page aligned, we don't need to use a bounce page.
   557		 */
   558		if (iommu_needs_bounce_buffer(dev)
   559				&& !iova_offset(iovad, phys | org_size)) {
   560			phys = swiotlb_tbl_map_single(dev,
   561					__phys_to_dma(dev, io_tlb_start),
   562					phys, org_size, aligned_size, dir, attrs);
   563	
   564			if (phys == DMA_MAPPING_ERROR)
   565				return DMA_MAPPING_ERROR;
   566	
   567			/* Cleanup the padding area. */
 > 568			void *padding_start = phys_to_virt(phys);
   569			size_t padding_size = aligned_size;
   570	
   571			if (!(attrs & DMA_ATTR_SKIP_CPU_SYNC) &&
   572			    (dir == DMA_TO_DEVICE ||
   573			     dir == DMA_BIDIRECTIONAL)) {
   574				padding_start += org_size;
   575				padding_size -= org_size;
   576			}
   577	
   578			memset(padding_start, 0, padding_size);
   579		}
   580	#endif
   581	
   582		iova = iommu_dma_alloc_iova(domain, aligned_size, dma_mask, dev);
   583		if (!iova)
   584			return DMA_MAPPING_ERROR;
   585	
   586		if (iommu_map_atomic(domain, iova, phys - iova_off, aligned_size,
   587					prot)) {
   588	
   589			if (unlikely(is_swiotlb_buffer(phys)))
   590				swiotlb_tbl_unmap_single(dev, phys, aligned_size,
   591						aligned_size, dir, attrs);
   592			iommu_dma_free_iova(cookie, iova, aligned_size, NULL);
   593			return DMA_MAPPING_ERROR;
   594		}
   595		return iova + iova_off;
   596	}
   597	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

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

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-12-24 10:20 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-21 15:03 [PATCH 0/8] Convert the intel iommu driver to the dma-iommu api Tom Murphy
2019-12-21 15:03 ` [PATCH 1/8] iommu/vt-d: clean up 32bit si_domain assignment Tom Murphy
2019-12-21 23:46   ` Arvind Sankar
2019-12-23  3:00   ` Lu Baolu
2019-12-21 15:03 ` [PATCH 2/8] iommu/vt-d: Use default dma_direct_* mapping functions for direct mapped devices Tom Murphy
2019-12-21 15:03 ` [PATCH 3/8] iommu/vt-d: Remove IOVA handling code from non-dma_ops path Tom Murphy
2020-03-20  6:30   ` Tom Murphy
2020-03-20  7:06     ` Lu Baolu
2019-12-21 15:03 ` [PATCH 4/8] iommu: Handle freelists when using deferred flushing in iommu drivers Tom Murphy
2019-12-21 15:03 ` [PATCH 5/8] iommu: Add iommu_dma_free_cpu_cached_iovas function Tom Murphy
2019-12-21 15:03 ` [PATCH 6/8] iommu: allow the dma-iommu api to use bounce buffers Tom Murphy
2019-12-24 10:20   ` kbuild test robot [this message]
2019-12-21 15:03 ` [PATCH 7/8] iommu/vt-d: Convert intel iommu driver to the iommu ops Tom Murphy
2019-12-21 15:04 ` [PATCH 8/8] DO NOT MERGE: iommu: disable list appending in dma-iommu Tom Murphy
2019-12-23 10:37 ` [PATCH 0/8] Convert the intel iommu driver to the dma-iommu api Jani Nikula
2019-12-23 11:29   ` Robin Murphy
2019-12-23 11:41     ` Jani Nikula
     [not found]       ` <87o8vzuv4i.fsf-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2020-03-20  6:28         ` Tom Murphy
2020-05-29  0:00 ` Logan Gunthorpe
2020-05-29 12:45   ` Christoph Hellwig
2020-05-29 19:05     ` Logan Gunthorpe
     [not found]       ` <33137cfb-603c-86e8-1091-f36117ecfaf3-OTvnGxWRz7hWk0Htik3J/w@public.gmane.org>
2020-05-29 21:11         ` Marek Szyprowski
2020-05-29 21:21           ` Logan Gunthorpe
2020-08-24  0:04             ` Tom Murphy
2020-08-26 18:26               ` Alex Deucher
2020-08-27 21:36               ` Logan Gunthorpe
2020-08-27 23:34                 ` Tom Murphy
2020-09-03 20:26                   ` Tom Murphy
2020-09-08 15:28                 ` [Intel-gfx] " Tvrtko Ursulin
2020-09-08 15:44                   ` Logan Gunthorpe
2020-09-08 15:56                     ` Tvrtko Ursulin
2020-09-08 22:43                       ` Tom Murphy
2020-09-09  9:16                         ` Tvrtko Ursulin
2020-09-09 12:55                           ` Tvrtko Ursulin
2020-09-10 13:33                             ` Tom Murphy
2020-09-10 13:34                               ` Tom Murphy
2020-08-26 18:14 ` Robin Murphy

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=201912241851.JzKAAEXa%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=agross@kernel.org \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric.auger@redhat.com \
    --cc=heiko@sntech.de \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jean-philippe@linaro.org \
    --cc=jonathanh@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=julien.grall@arm.com \
    --cc=krzk@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=matthias.bgg@gmail.com \
    --cc=maz@kernel.org \
    --cc=murphyt7@tcd.ie \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).