[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202501121223.KuJ3vwbu-lkp@intel.com>
Date: Sun, 12 Jan 2025 12:08:58 +0800
From: kernel test robot <lkp@...el.com>
To: David Howells <dhowells@...hat.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: arch/mips/include/asm/cmpxchg.h:79:24: sparse: sparse: cast
truncates bits from constant value (8000000000000000 becomes 0)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b62cef9a5c673f1b8083159f5dc03c1c5daced2f
commit: 453924de6212ac159f946b75c6b59918e2e30944 afs: Overhaul invalidation handling to better support RO volumes
date: 1 year ago
config: mips-randconfig-r121-20250112 (https://download.01.org/0day-ci/archive/20250112/202501121223.KuJ3vwbu-lkp@intel.com/config)
compiler: mips64-linux-gcc (GCC) 14.2.0
reproduce: (https://download.01.org/0day-ci/archive/20250112/202501121223.KuJ3vwbu-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501121223.KuJ3vwbu-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/afs/rotate.c: note: in included file (through arch/mips/include/asm/atomic.h, include/linux/atomic.h, arch/mips/include/asm/processor.h, ...):
>> arch/mips/include/asm/cmpxchg.h:79:24: sparse: sparse: cast truncates bits from constant value (8000000000000000 becomes 0)
--
fs/afs/callback.c: note: in included file (through arch/mips/include/asm/atomic.h, include/linux/atomic.h, include/linux/cpumask.h, ...):
>> arch/mips/include/asm/cmpxchg.h:79:24: sparse: sparse: cast truncates bits from constant value (8000000000000000 becomes 0)
fs/afs/callback.c:146:22: sparse: sparse: context imbalance in 'afs_lookup_volume_rcu' - different lock contexts for basic block
vim +79 arch/mips/include/asm/cmpxchg.h
5154f3b4194910 Paul Burton 2017-06-09 66
b70eb30056dc84 Paul Burton 2017-06-09 67 extern unsigned long __xchg_small(volatile void *ptr, unsigned long val,
b70eb30056dc84 Paul Burton 2017-06-09 68 unsigned int size);
b70eb30056dc84 Paul Burton 2017-06-09 69
46f1619500d022 Thomas Bogendoerfer 2019-10-09 70 static __always_inline
068550631fbe0b Andrzej Hajda 2023-01-18 71 unsigned long __arch_xchg(volatile void *ptr, unsigned long x, int size)
b81947c646bfef David Howells 2012-03-28 72 {
b81947c646bfef David Howells 2012-03-28 73 switch (size) {
b70eb30056dc84 Paul Burton 2017-06-09 74 case 1:
b70eb30056dc84 Paul Burton 2017-06-09 75 case 2:
b70eb30056dc84 Paul Burton 2017-06-09 76 return __xchg_small(ptr, x, size);
b70eb30056dc84 Paul Burton 2017-06-09 77
b81947c646bfef David Howells 2012-03-28 78 case 4:
62c6081dca75d6 Paul Burton 2017-06-09 @79 return __xchg_asm("ll", "sc", (volatile u32 *)ptr, x);
62c6081dca75d6 Paul Burton 2017-06-09 80
b81947c646bfef David Howells 2012-03-28 81 case 8:
62c6081dca75d6 Paul Burton 2017-06-09 82 if (!IS_ENABLED(CONFIG_64BIT))
62c6081dca75d6 Paul Burton 2017-06-09 83 return __xchg_called_with_bad_pointer();
62c6081dca75d6 Paul Burton 2017-06-09 84
62c6081dca75d6 Paul Burton 2017-06-09 85 return __xchg_asm("lld", "scd", (volatile u64 *)ptr, x);
62c6081dca75d6 Paul Burton 2017-06-09 86
d15dc68c1143e2 Paul Burton 2017-06-09 87 default:
d15dc68c1143e2 Paul Burton 2017-06-09 88 return __xchg_called_with_bad_pointer();
b81947c646bfef David Howells 2012-03-28 89 }
b81947c646bfef David Howells 2012-03-28 90 }
b81947c646bfef David Howells 2012-03-28 91
:::::: The code at line 79 was first introduced by commit
:::::: 62c6081dca75d6bec1198ed5a1ae50968b323a8c MIPS: cmpxchg: Drop __xchg_u{32,64} functions
:::::: TO: Paul Burton <paul.burton@...tec.com>
:::::: CC: Ralf Baechle <ralf@...ux-mips.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists