linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 2329/11761] arch/powerpc/include/asm/cmpxchg.h:626:47: sparse: sparse: cast truncates bits from constant value (5deadbeef000eb9f becomes f000eb9f)
@ 2023-08-22 15:42 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-22 15:42 UTC (permalink / raw)
  To: Dave Marchevsky
  Cc: oe-kbuild-all, Linux Memory Management List, Alexei Starovoitov

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   28c736b0e92e11bfe2b9997688213dc43cb22182
commit: c3c510ce431cd99fa10dcd50d995c8e89330ee5b [2329/11761] bpf: Add 'owner' field to bpf_{list,rb}_node
config: powerpc64-randconfig-r131-20230822 (https://download.01.org/0day-ci/archive/20230822/202308222338.DPTQeMxG-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230822/202308222338.DPTQeMxG-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/202308222338.DPTQeMxG-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
   kernel/bpf/helpers.c: note: in included file (through arch/powerpc/include/asm/atomic.h, arch/powerpc/include/asm/paca.h, arch/powerpc/include/asm/current.h, ...):
>> arch/powerpc/include/asm/cmpxchg.h:626:47: sparse: sparse: cast truncates bits from constant value (5deadbeef000eb9f becomes f000eb9f)
   arch/powerpc/include/asm/cmpxchg.h:628:48: sparse: sparse: cast truncates bits from constant value (5deadbeef000eb9f becomes f000eb9f)
>> arch/powerpc/include/asm/cmpxchg.h:626:47: sparse: sparse: cast truncates bits from constant value (5deadbeef000eb9f becomes f000eb9f)
   arch/powerpc/include/asm/cmpxchg.h:628:48: sparse: sparse: cast truncates bits from constant value (5deadbeef000eb9f becomes f000eb9f)
   kernel/bpf/helpers.c:2419:18: sparse: sparse: context imbalance in 'bpf_rcu_read_lock' - wrong count at exit
   kernel/bpf/helpers.c: note: in included file (through include/linux/workqueue.h, include/linux/bpf.h):
   include/linux/rcupdate.h:780:9: sparse: sparse: context imbalance in 'bpf_rcu_read_unlock' - unexpected unlock

vim +626 arch/powerpc/include/asm/cmpxchg.h

ae3a197e3d0bfe David Howells    2012-03-28  619  
ae3a197e3d0bfe David Howells    2012-03-28  620  static __always_inline unsigned long
da58b23cb976ab Michael Ellerman 2016-11-24  621  __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new,
ae3a197e3d0bfe David Howells    2012-03-28  622  	  unsigned int size)
ae3a197e3d0bfe David Howells    2012-03-28  623  {
ae3a197e3d0bfe David Howells    2012-03-28  624  	switch (size) {
d0563a1297e234 Pan Xinhui       2016-04-27  625  	case 1:
d0563a1297e234 Pan Xinhui       2016-04-27 @626  		return __cmpxchg_u8(ptr, old, new);
d0563a1297e234 Pan Xinhui       2016-04-27  627  	case 2:
d0563a1297e234 Pan Xinhui       2016-04-27  628  		return __cmpxchg_u16(ptr, old, new);
ae3a197e3d0bfe David Howells    2012-03-28  629  	case 4:
ae3a197e3d0bfe David Howells    2012-03-28  630  		return __cmpxchg_u32(ptr, old, new);
ae3a197e3d0bfe David Howells    2012-03-28  631  #ifdef CONFIG_PPC64
ae3a197e3d0bfe David Howells    2012-03-28  632  	case 8:
ae3a197e3d0bfe David Howells    2012-03-28  633  		return __cmpxchg_u64(ptr, old, new);
ae3a197e3d0bfe David Howells    2012-03-28  634  #endif
ae3a197e3d0bfe David Howells    2012-03-28  635  	}
10d8b1480e6966 pan xinhui       2016-02-23  636  	BUILD_BUG_ON_MSG(1, "Unsupported size for __cmpxchg");
ae3a197e3d0bfe David Howells    2012-03-28  637  	return old;
ae3a197e3d0bfe David Howells    2012-03-28  638  }
ae3a197e3d0bfe David Howells    2012-03-28  639  

:::::: The code at line 626 was first introduced by commit
:::::: d0563a1297e234ed37f6b51c2e9321accebd1839 powerpc: Implement {cmp}xchg for u8 and u16

:::::: TO: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
:::::: CC: Michael Ellerman <mpe@ellerman.id.au>

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-22 15:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-22 15:42 [linux-next:master 2329/11761] arch/powerpc/include/asm/cmpxchg.h:626:47: sparse: sparse: cast truncates bits from constant value (5deadbeef000eb9f becomes f000eb9f) kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox