linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rick Wertenbroek <rick.wertenbroek@gmail.com>,
	alberto.dassatti@heig-vd.ch
Cc: oe-kbuild-all@lists.linux.dev, dlemoal@kernel.org,
	"Rick Wertenbroek" <rick.wertenbroek@gmail.com>,
	"Dan Carpenter" <error27@gmail.com>,
	stable@vger.kernel.org, "Shawn Lin" <shawn.lin@rock-chips.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Bjorn Helgaas" <helgaas@kernel.org>,
	"Heiko Stuebner" <heiko@sntech.de>,
	linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address
Date: Mon, 3 Jul 2023 21:03:58 +0800	[thread overview]
Message-ID: <202307032003.1fpK28pS-lkp@intel.com> (raw)
In-Reply-To: <20230703085845.2052008-1-rick.wertenbroek@gmail.com>

Hi Rick,

kernel test robot noticed the following build warnings:

[auto build test WARNING on pci/next]
[also build test WARNING on linus/master next-20230703]
[cannot apply to pci/for-linus v6.4]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Rick-Wertenbroek/PCI-rockchip-Use-64-bit-mask-on-MSI-64-bit-PCI-address/20230703-165959
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link:    https://lore.kernel.org/r/20230703085845.2052008-1-rick.wertenbroek%40gmail.com
patch subject: [PATCH v2] PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address
config: arm-allyesconfig (https://download.01.org/0day-ci/archive/20230703/202307032003.1fpK28pS-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230703/202307032003.1fpK28pS-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/202307032003.1fpK28pS-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from include/linux/bitops.h:6,
                    from include/linux/log2.h:12,
                    from include/asm-generic/div64.h:55,
                    from arch/arm/include/asm/div64.h:107,
                    from include/linux/math.h:6,
                    from include/linux/math64.h:6,
                    from include/linux/time.h:6,
                    from include/linux/stat.h:19,
                    from include/linux/configfs.h:22,
                    from drivers/pci/controller/pcie-rockchip-ep.c:11:
   drivers/pci/controller/pcie-rockchip-ep.c: In function 'rockchip_pcie_prog_ep_ob_atu':
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip.h:167:49: note: in expansion of macro 'PCIE_ADDR_MASK'
     167 | #define   PCIE_CORE_OB_REGION_ADDR0_LO_ADDR     PCIE_ADDR_MASK
         |                                                 ^~~~~~~~~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:77:44: note: in expansion of macro 'PCIE_CORE_OB_REGION_ADDR0_LO_ADDR'
      77 |                 (lower_32_bits(pci_addr) & PCIE_CORE_OB_REGION_ADDR0_LO_ADDR);
         |                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/asm-generic/div64.h:27:
   drivers/pci/controller/pcie-rockchip-ep.c: In function 'rockchip_pcie_ep_send_msi_irq':
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/compiler.h:78:45: note: in definition of macro 'unlikely'
      78 | # define unlikely(x)    __builtin_expect(!!(x), 0)
         |                                             ^
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:394:54: note: in expansion of macro 'PCIE_ADDR_MASK'
     394 |         if (unlikely(ep->irq_pci_addr != (pci_addr & PCIE_ADDR_MASK) ||
         |                                                      ^~~~~~~~~~~~~~
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:399:57: note: in expansion of macro 'PCIE_ADDR_MASK'
     399 |                                              pci_addr & PCIE_ADDR_MASK,
         |                                                         ^~~~~~~~~~~~~~
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:400:47: note: in expansion of macro 'PCIE_ADDR_MASK'
     400 |                                              ~PCIE_ADDR_MASK + 1);
         |                                               ^~~~~~~~~~~~~~
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:401:48: note: in expansion of macro 'PCIE_ADDR_MASK'
     401 |                 ep->irq_pci_addr = (pci_addr & PCIE_ADDR_MASK);
         |                                                ^~~~~~~~~~~~~~
   In file included from include/linux/io.h:13,
                    from include/linux/irq.h:20,
                    from include/asm-generic/hardirq.h:17,
                    from arch/arm/include/asm/hardirq.h:10,
                    from include/linux/hardirq.h:11,
                    from include/linux/interrupt.h:11,
                    from include/linux/pci.h:38,
                    from include/linux/pci-epf.h:15,
                    from include/linux/pci-epc.h:12,
                    from drivers/pci/controller/pcie-rockchip-ep.c:15:
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   arch/arm/include/asm/io.h:281:75: note: in definition of macro 'writew_relaxed'
     281 | #define writew_relaxed(v,c)     __raw_writew((__force u16) cpu_to_le16(v),c)
         |                                                                           ^
   drivers/pci/controller/pcie-rockchip-ep.c:405:9: note: in expansion of macro 'writew'
     405 |         writew(data, ep->irq_cpu_addr + (pci_addr & ~PCIE_ADDR_MASK));
         |         ^~~~~~
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip-ep.c:405:54: note: in expansion of macro 'PCIE_ADDR_MASK'
     405 |         writew(data, ep->irq_cpu_addr + (pci_addr & ~PCIE_ADDR_MASK));
         |                                                      ^~~~~~~~~~~~~~
--
   In file included from include/linux/bitops.h:6,
                    from include/linux/kernel.h:22,
                    from include/linux/clk.h:13,
                    from drivers/pci/controller/pcie-rockchip-host.c:15:
   drivers/pci/controller/pcie-rockchip-host.c: In function 'rockchip_pcie_prog_ob_atu':
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip.h:167:49: note: in expansion of macro 'PCIE_ADDR_MASK'
     167 | #define   PCIE_CORE_OB_REGION_ADDR0_LO_ADDR     PCIE_ADDR_MASK
         |                                                 ^~~~~~~~~~~~~~
   drivers/pci/controller/pcie-rockchip-host.c:733:35: note: in expansion of macro 'PCIE_CORE_OB_REGION_ADDR0_LO_ADDR'
     733 |         ob_addr_0 |= lower_addr & PCIE_CORE_OB_REGION_ADDR0_LO_ADDR;
         |                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/controller/pcie-rockchip-host.c: In function 'rockchip_pcie_prog_ib_atu':
>> include/linux/bits.h:35:18: warning: right shift count is negative [-Wshift-count-negative]
      35 |          (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
         |                  ^~
   include/linux/bits.h:37:38: note: in expansion of macro '__GENMASK'
      37 |         (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
         |                                      ^~~~~~~~~
   drivers/pci/controller/pcie-rockchip.h:163:41: note: in expansion of macro 'GENMASK'
     163 | #define PCIE_ADDR_MASK                  GENMASK(63, MIN_AXI_ADDR_BITS_PASSED)
         |                                         ^~~~~~~
   drivers/pci/controller/pcie-rockchip.h:175:49: note: in expansion of macro 'PCIE_ADDR_MASK'
     175 | #define   PCIE_CORE_IB_REGION_ADDR0_LO_ADDR     PCIE_ADDR_MASK
         |                                                 ^~~~~~~~~~~~~~
   drivers/pci/controller/pcie-rockchip-host.c:767:42: note: in expansion of macro 'PCIE_CORE_IB_REGION_ADDR0_LO_ADDR'
     767 |         ib_addr_0 |= (lower_addr << 8) & PCIE_CORE_IB_REGION_ADDR0_LO_ADDR;
         |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +35 include/linux/bits.h

295bcca84916cb Rikard Falkeborn 2020-04-06  32  
295bcca84916cb Rikard Falkeborn 2020-04-06  33  #define __GENMASK(h, l) \
95b980d62d52c4 Masahiro Yamada  2019-07-16  34  	(((~UL(0)) - (UL(1) << (l)) + 1) & \
95b980d62d52c4 Masahiro Yamada  2019-07-16 @35  	 (~UL(0) >> (BITS_PER_LONG - 1 - (h))))
295bcca84916cb Rikard Falkeborn 2020-04-06  36  #define GENMASK(h, l) \
295bcca84916cb Rikard Falkeborn 2020-04-06  37  	(GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l))
8bd9cb51daac89 Will Deacon      2018-06-19  38  

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

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

  parent reply	other threads:[~2023-07-03 13:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03  8:58 [PATCH v2] PCI: rockchip: Use 64-bit mask on MSI 64-bit PCI address Rick Wertenbroek
2023-07-03  9:10 ` Damien Le Moal
2023-07-03 10:18 ` Robin Murphy
2023-07-03 12:08   ` Krzysztof Wilczyński
2023-07-03 12:59     ` Rick Wertenbroek
2023-07-03 13:03 ` kernel test robot [this message]
2023-07-04 16:37 ` Krzysztof Wilczyński

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=202307032003.1fpK28pS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=alberto.dassatti@heig-vd.ch \
    --cc=dlemoal@kernel.org \
    --cc=error27@gmail.com \
    --cc=heiko@sntech.de \
    --cc=helgaas@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rick.wertenbroek@gmail.com \
    --cc=robh@kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=stable@vger.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).