All of lore.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: kernel test robot <lkp@intel.com>, Robin Murphy <robin.murphy@arm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [arm64:devel/kmalloc-minalign 13/15] include/linux/scatterlist.h:257:18: error: 'struct scatterlist' has no member named 'dma_flags'
Date: Fri, 26 May 2023 09:16:22 +0100	[thread overview]
Message-ID: <ZHBq1iFAmZ7p8tae@arm.com> (raw)
In-Reply-To: <202305260427.aA5xG5kM-lkp@intel.com>

On Fri, May 26, 2023 at 04:23:54AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel/kmalloc-minalign
> head:   d929a28c8da3f1bc095e4aa0d1b811972929351a
> commit: f0b92f544e6b440500c3823c7c47b542816cb4cd [13/15] iommu/dma: Force bouncing if the size is not cacheline-aligned
> config: x86_64-buildonly-randconfig-r002-20230524
> compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=f0b92f544e6b440500c3823c7c47b542816cb4cd
>         git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
>         git fetch --no-tags arm64 devel/kmalloc-minalign
>         git checkout f0b92f544e6b440500c3823c7c47b542816cb4cd
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=x86_64 olddefconfig
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/rapidio/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202305260427.aA5xG5kM-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/dma-mapping.h:10,
>                     from drivers/rapidio/rio-scan.c:21:
>    include/linux/scatterlist.h: In function 'sg_is_dma_use_swiotlb':
> >> include/linux/scatterlist.h:257:18: error: 'struct scatterlist' has no member named 'dma_flags'
>      257 |         return sg->dma_flags & SG_DMA_USE_SWIOTLB;
>          |                  ^~

I fixed it as:

diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 330a157c5501..3a1fd9e23a83 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -251,7 +251,7 @@ static inline void sg_unmark_end(struct scatterlist *sg)
 #define SG_DMA_BUS_ADDRESS	(1 << 0)
 #define SG_DMA_USE_SWIOTLB	(1 << 1)

-#ifdef CONFIG_SWIOTLB
+#if defined(CONFIG_IOMMU_DMA) && defined(CONFIG_SWIOTLB)
 static inline bool sg_is_dma_use_swiotlb(struct scatterlist *sg)
 {
 	return sg->dma_flags & SG_DMA_USE_SWIOTLB;

But I wonder whether we could move these functions in the dma-iommu.c
code as they get included in lots of unrelated places.

-- 
Catalin

WARNING: multiple messages have this Message-ID (diff)
From: Catalin Marinas <catalin.marinas@arm.com>
To: kernel test robot <lkp@intel.com>, Robin Murphy <robin.murphy@arm.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Subject: Re: [arm64:devel/kmalloc-minalign 13/15] include/linux/scatterlist.h:257:18: error: 'struct scatterlist' has no member named 'dma_flags'
Date: Fri, 26 May 2023 09:16:22 +0100	[thread overview]
Message-ID: <ZHBq1iFAmZ7p8tae@arm.com> (raw)
In-Reply-To: <202305260427.aA5xG5kM-lkp@intel.com>

On Fri, May 26, 2023 at 04:23:54AM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel/kmalloc-minalign
> head:   d929a28c8da3f1bc095e4aa0d1b811972929351a
> commit: f0b92f544e6b440500c3823c7c47b542816cb4cd [13/15] iommu/dma: Force bouncing if the size is not cacheline-aligned
> config: x86_64-buildonly-randconfig-r002-20230524
> compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=f0b92f544e6b440500c3823c7c47b542816cb4cd
>         git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
>         git fetch --no-tags arm64 devel/kmalloc-minalign
>         git checkout f0b92f544e6b440500c3823c7c47b542816cb4cd
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         make W=1 O=build_dir ARCH=x86_64 olddefconfig
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/rapidio/
> 
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202305260427.aA5xG5kM-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/dma-mapping.h:10,
>                     from drivers/rapidio/rio-scan.c:21:
>    include/linux/scatterlist.h: In function 'sg_is_dma_use_swiotlb':
> >> include/linux/scatterlist.h:257:18: error: 'struct scatterlist' has no member named 'dma_flags'
>      257 |         return sg->dma_flags & SG_DMA_USE_SWIOTLB;
>          |                  ^~

I fixed it as:

diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
index 330a157c5501..3a1fd9e23a83 100644
--- a/include/linux/scatterlist.h
+++ b/include/linux/scatterlist.h
@@ -251,7 +251,7 @@ static inline void sg_unmark_end(struct scatterlist *sg)
 #define SG_DMA_BUS_ADDRESS	(1 << 0)
 #define SG_DMA_USE_SWIOTLB	(1 << 1)

-#ifdef CONFIG_SWIOTLB
+#if defined(CONFIG_IOMMU_DMA) && defined(CONFIG_SWIOTLB)
 static inline bool sg_is_dma_use_swiotlb(struct scatterlist *sg)
 {
 	return sg->dma_flags & SG_DMA_USE_SWIOTLB;

But I wonder whether we could move these functions in the dma-iommu.c
code as they get included in lots of unrelated places.

-- 
Catalin

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2023-05-26  8:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 20:23 [arm64:devel/kmalloc-minalign 13/15] include/linux/scatterlist.h:257:18: error: 'struct scatterlist' has no member named 'dma_flags' kernel test robot
2023-05-26  8:16 ` Catalin Marinas [this message]
2023-05-26  8:16   ` Catalin Marinas

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=ZHBq1iFAmZ7p8tae@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robin.murphy@arm.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 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.