All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: kbuild test robot <lkp@intel.com>
Cc: Jean-Philippe Brucker <jean-philippe@linaro.org>,
	kbuild-all@lists.01.org, Douglas Anderson <dianders@chromium.org>,
	linux-kernel@vger.kernel.org, Tero Kristo <t-kristo@ti.com>,
	iommu@lists.linux-foundation.org,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH 3/3] iommu: Enable compile testing for some of drivers
Date: Tue, 31 Dec 2019 09:07:22 +0100	[thread overview]
Message-ID: <20191231080722.GA6804@pi3> (raw)
In-Reply-To: <201912311551.tBrb3BhH%lkp@intel.com>

On Tue, Dec 31, 2019 at 03:43:39PM +0800, kbuild test robot wrote:
> Hi Krzysztof,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on iommu/next]
> [also build test WARNING on v5.5-rc4]
> [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/Krzysztof-Kozlowski/iommu-omap-Fix-pointer-cast-Wpointer-to-int-cast-warnings-on-64-bit/20191231-022212
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 7.5.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.5.0 make.cross ARCH=ia64 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>

I saw it already while compile testing my patch. I must admit that I
could not find easy/fast fix for it.  Probably the
omap_iommu_translate() helper should be made 64-bit friendly but this
obfuscates the code. The driver and hardware supports only 32-bit addresses.

Best regards,
Krzysztof


> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from drivers/iommu/omap-iommu.c:33:0:
>    drivers/iommu/omap-iommu.c: In function 'omap_iommu_iova_to_phys':
> >> drivers/iommu/omap-iopgtable.h:44:21: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOPTE_MASK  (~(IOPTE_SIZE - 1))
>                         ^
> >> drivers/iommu/omap-iommu.c:1641:41: note: in expansion of macro 'IOPTE_MASK'
>        ret = omap_iommu_translate(*pte, da, IOPTE_MASK);
>                                             ^~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:51:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOLARGE_MASK  (~(IOLARGE_SIZE - 1))
>                           ^
> >> drivers/iommu/omap-iommu.c:1643:41: note: in expansion of macro 'IOLARGE_MASK'
>        ret = omap_iommu_translate(*pte, da, IOLARGE_MASK);
>                                             ^~~~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:27:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOSECTION_MASK  (~(IOSECTION_SIZE - 1))
>                             ^
> >> drivers/iommu/omap-iommu.c:1649:41: note: in expansion of macro 'IOSECTION_MASK'
>        ret = omap_iommu_translate(*pgd, da, IOSECTION_MASK);
>                                             ^~~~~~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:34:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOSUPER_MASK  (~(IOSUPER_SIZE - 1))
>                           ^
> >> drivers/iommu/omap-iommu.c:1651:41: note: in expansion of macro 'IOSUPER_MASK'
>        ret = omap_iommu_translate(*pgd, da, IOSUPER_MASK);
>                                             ^~~~~~~~~~~~
> 
> vim +44 drivers/iommu/omap-iopgtable.h
> 
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  38  
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  39  /*
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  40   * "small page" address mask and size definitions.
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  41   */
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26  42  #define IOPTE_SHIFT		12
> 5ff98fa68c88d7 drivers/iommu/omap-iopgtable.h Suman Anna   2015-07-20  43  #define IOPTE_SIZE		BIT(IOPTE_SHIFT)
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26 @44  #define IOPTE_MASK		(~(IOPTE_SIZE - 1))
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26  45  
> 
> :::::: The code at line 44 was first introduced by commit
> :::::: a9dcad5e375800fcb07f7617dba23b3aade8f09d omap iommu: tlb and pagetable primitives
> 
> :::::: TO: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> :::::: CC: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> 
> ---
> 0-DAY kernel test infrastructure                 Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation


_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 3/3] iommu: Enable compile testing for some of drivers
Date: Tue, 31 Dec 2019 09:07:22 +0100	[thread overview]
Message-ID: <20191231080722.GA6804@pi3> (raw)
In-Reply-To: <201912311551.tBrb3BhH%lkp@intel.com>

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

On Tue, Dec 31, 2019 at 03:43:39PM +0800, kbuild test robot wrote:
> Hi Krzysztof,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on iommu/next]
> [also build test WARNING on v5.5-rc4]
> [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/Krzysztof-Kozlowski/iommu-omap-Fix-pointer-cast-Wpointer-to-int-cast-warnings-on-64-bit/20191231-022212
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 7.5.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.5.0 make.cross ARCH=ia64 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>

I saw it already while compile testing my patch. I must admit that I
could not find easy/fast fix for it.  Probably the
omap_iommu_translate() helper should be made 64-bit friendly but this
obfuscates the code. The driver and hardware supports only 32-bit addresses.

Best regards,
Krzysztof


> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from drivers/iommu/omap-iommu.c:33:0:
>    drivers/iommu/omap-iommu.c: In function 'omap_iommu_iova_to_phys':
> >> drivers/iommu/omap-iopgtable.h:44:21: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOPTE_MASK  (~(IOPTE_SIZE - 1))
>                         ^
> >> drivers/iommu/omap-iommu.c:1641:41: note: in expansion of macro 'IOPTE_MASK'
>        ret = omap_iommu_translate(*pte, da, IOPTE_MASK);
>                                             ^~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:51:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOLARGE_MASK  (~(IOLARGE_SIZE - 1))
>                           ^
> >> drivers/iommu/omap-iommu.c:1643:41: note: in expansion of macro 'IOLARGE_MASK'
>        ret = omap_iommu_translate(*pte, da, IOLARGE_MASK);
>                                             ^~~~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:27:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOSECTION_MASK  (~(IOSECTION_SIZE - 1))
>                             ^
> >> drivers/iommu/omap-iommu.c:1649:41: note: in expansion of macro 'IOSECTION_MASK'
>        ret = omap_iommu_translate(*pgd, da, IOSECTION_MASK);
>                                             ^~~~~~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:34:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOSUPER_MASK  (~(IOSUPER_SIZE - 1))
>                           ^
> >> drivers/iommu/omap-iommu.c:1651:41: note: in expansion of macro 'IOSUPER_MASK'
>        ret = omap_iommu_translate(*pgd, da, IOSUPER_MASK);
>                                             ^~~~~~~~~~~~
> 
> vim +44 drivers/iommu/omap-iopgtable.h
> 
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  38  
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  39  /*
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  40   * "small page" address mask and size definitions.
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  41   */
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26  42  #define IOPTE_SHIFT		12
> 5ff98fa68c88d7 drivers/iommu/omap-iopgtable.h Suman Anna   2015-07-20  43  #define IOPTE_SIZE		BIT(IOPTE_SHIFT)
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26 @44  #define IOPTE_MASK		(~(IOPTE_SIZE - 1))
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26  45  
> 
> :::::: The code at line 44 was first introduced by commit
> :::::: a9dcad5e375800fcb07f7617dba23b3aade8f09d omap iommu: tlb and pagetable primitives
> 
> :::::: TO: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> :::::: CC: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> 
> ---
> 0-DAY kernel test infrastructure                 Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation


WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org, Joerg Roedel <joro@8bytes.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Jean-Philippe Brucker <jean-philippe@linaro.org>,
	Eric Auger <eric.auger@redhat.com>,
	Douglas Anderson <dianders@chromium.org>,
	Suman Anna <s-anna@ti.com>, Tero Kristo <t-kristo@ti.com>,
	iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] iommu: Enable compile testing for some of drivers
Date: Tue, 31 Dec 2019 09:07:22 +0100	[thread overview]
Message-ID: <20191231080722.GA6804@pi3> (raw)
In-Reply-To: <201912311551.tBrb3BhH%lkp@intel.com>

On Tue, Dec 31, 2019 at 03:43:39PM +0800, kbuild test robot wrote:
> Hi Krzysztof,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on iommu/next]
> [also build test WARNING on v5.5-rc4]
> [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/Krzysztof-Kozlowski/iommu-omap-Fix-pointer-cast-Wpointer-to-int-cast-warnings-on-64-bit/20191231-022212
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next
> config: ia64-allmodconfig (attached as .config)
> compiler: ia64-linux-gcc (GCC) 7.5.0
> reproduce:
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.5.0 make.cross ARCH=ia64 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>

I saw it already while compile testing my patch. I must admit that I
could not find easy/fast fix for it.  Probably the
omap_iommu_translate() helper should be made 64-bit friendly but this
obfuscates the code. The driver and hardware supports only 32-bit addresses.

Best regards,
Krzysztof


> 
> All warnings (new ones prefixed by >>):
> 
>    In file included from drivers/iommu/omap-iommu.c:33:0:
>    drivers/iommu/omap-iommu.c: In function 'omap_iommu_iova_to_phys':
> >> drivers/iommu/omap-iopgtable.h:44:21: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOPTE_MASK  (~(IOPTE_SIZE - 1))
>                         ^
> >> drivers/iommu/omap-iommu.c:1641:41: note: in expansion of macro 'IOPTE_MASK'
>        ret = omap_iommu_translate(*pte, da, IOPTE_MASK);
>                                             ^~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:51:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOLARGE_MASK  (~(IOLARGE_SIZE - 1))
>                           ^
> >> drivers/iommu/omap-iommu.c:1643:41: note: in expansion of macro 'IOLARGE_MASK'
>        ret = omap_iommu_translate(*pte, da, IOLARGE_MASK);
>                                             ^~~~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:27:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOSECTION_MASK  (~(IOSECTION_SIZE - 1))
>                             ^
> >> drivers/iommu/omap-iommu.c:1649:41: note: in expansion of macro 'IOSECTION_MASK'
>        ret = omap_iommu_translate(*pgd, da, IOSECTION_MASK);
>                                             ^~~~~~~~~~~~~~
>    drivers/iommu/omap-iopgtable.h:34:23: warning: large integer implicitly truncated to unsigned type [-Woverflow]
>     #define IOSUPER_MASK  (~(IOSUPER_SIZE - 1))
>                           ^
> >> drivers/iommu/omap-iommu.c:1651:41: note: in expansion of macro 'IOSUPER_MASK'
>        ret = omap_iommu_translate(*pgd, da, IOSUPER_MASK);
>                                             ^~~~~~~~~~~~
> 
> vim +44 drivers/iommu/omap-iopgtable.h
> 
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  38  
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  39  /*
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  40   * "small page" address mask and size definitions.
> 97ec7d585b33bb arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2010-02-15  41   */
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26  42  #define IOPTE_SHIFT		12
> 5ff98fa68c88d7 drivers/iommu/omap-iopgtable.h Suman Anna   2015-07-20  43  #define IOPTE_SIZE		BIT(IOPTE_SHIFT)
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26 @44  #define IOPTE_MASK		(~(IOPTE_SIZE - 1))
> a9dcad5e375800 arch/arm/plat-omap/iopgtable.h Hiroshi DOYU 2009-01-26  45  
> 
> :::::: The code at line 44 was first introduced by commit
> :::::: a9dcad5e375800fcb07f7617dba23b3aade8f09d omap iommu: tlb and pagetable primitives
> 
> :::::: TO: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> :::::: CC: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
> 
> ---
> 0-DAY kernel test infrastructure                 Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation



  reply	other threads:[~2019-12-31  8:07 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-30 17:26 [PATCH 1/3] iommu: omap: Fix pointer cast -Wpointer-to-int-cast warnings on 64 bit Krzysztof Kozlowski
2019-12-30 17:26 ` Krzysztof Kozlowski
2019-12-30 17:26 ` [PATCH 2/3] iommu: omap: Fix printing format for size_t on 64-bit Krzysztof Kozlowski
2019-12-30 17:26   ` Krzysztof Kozlowski
2020-01-02 22:30   ` Suman Anna via iommu
2020-01-02 22:30     ` Suman Anna
2019-12-30 17:26 ` [PATCH 3/3] iommu: Enable compile testing for some of drivers Krzysztof Kozlowski
2019-12-30 17:26   ` Krzysztof Kozlowski
2019-12-31  1:08   ` kbuild test robot
2019-12-31  1:08     ` kbuild test robot
2019-12-31  1:08     ` kbuild test robot
2019-12-31  8:14     ` Krzysztof Kozlowski
2019-12-31  8:14       ` Krzysztof Kozlowski
2019-12-31  8:14       ` Krzysztof Kozlowski
2019-12-31  7:43   ` kbuild test robot
2019-12-31  7:43     ` kbuild test robot
2019-12-31  7:43     ` kbuild test robot
2019-12-31  8:07     ` Krzysztof Kozlowski [this message]
2019-12-31  8:07       ` Krzysztof Kozlowski
2019-12-31  8:07       ` Krzysztof Kozlowski
2020-01-02 22:40       ` Suman Anna via iommu
2020-01-02 22:40         ` Suman Anna
2020-01-02 22:40         ` Suman Anna
2020-01-03  8:57         ` Krzysztof Kozlowski
2020-01-03  8:57           ` Krzysztof Kozlowski
2020-01-03  8:57           ` Krzysztof Kozlowski

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=20191231080722.GA6804@pi3 \
    --to=krzk@kernel.org \
    --cc=dianders@chromium.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jean-philippe@linaro.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=robin.murphy@arm.com \
    --cc=t-kristo@ti.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.