From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>
Subject: [linux-next:master 6546/9925] arch/loongarch/include/asm/cmpxchg.h:70:42: sparse: sparse: cast truncates bits from constant value (8000000000000000 becomes 0)
Date: Sat, 30 Dec 2023 02:19:03 +0800 [thread overview]
Message-ID: <202312300218.jKdzoA8z-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 39676dfe52331dba909c617f213fdb21015c8d10
commit: 4a0d72ea10ce156eb2269358fa38528f62a96081 [6546/9925] afs: Overhaul invalidation handling to better support RO volumes
config: loongarch-randconfig-r122-20231229 (https://download.01.org/0day-ci/archive/20231230/202312300218.jKdzoA8z-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 13.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231230/202312300218.jKdzoA8z-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/202312300218.jKdzoA8z-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
fs/afs/callback.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/umh.h, include/linux/kmod.h, ...):
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
fs/afs/callback.c: note: in included file (through arch/loongarch/include/asm/atomic.h, include/linux/atomic.h, include/asm-generic/bitops/atomic.h, ...):
>> arch/loongarch/include/asm/cmpxchg.h:70:42: sparse: sparse: cast truncates bits from constant value (8000000000000000 becomes 0)
arch/loongarch/include/asm/cmpxchg.h:73: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
--
fs/afs/rotate.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/slab.h):
include/linux/page-flags.h:242:46: sparse: sparse: self-comparison always evaluates to false
fs/afs/rotate.c: note: in included file (through arch/loongarch/include/asm/atomic.h, include/linux/atomic.h, include/asm-generic/bitops/atomic.h, ...):
>> arch/loongarch/include/asm/cmpxchg.h:70:42: sparse: sparse: cast truncates bits from constant value (8000000000000000 becomes 0)
arch/loongarch/include/asm/cmpxchg.h:73:24: sparse: sparse: cast truncates bits from constant value (8000000000000000 becomes 0)
fs/afs/rotate.c:639:42: sparse: sparse: self-comparison always evaluates to true
vim +70 arch/loongarch/include/asm/cmpxchg.h
720dc7ab252bbd Huacai Chen 2022-08-25 63
ddf502717da029 Huacai Chen 2022-10-12 64 static __always_inline unsigned long
068550631fbe0b Andrzej Hajda 2023-01-18 65 __arch_xchg(volatile void *ptr, unsigned long x, int size)
5b0b14e550a006 Huacai Chen 2022-05-31 66 {
5b0b14e550a006 Huacai Chen 2022-05-31 67 switch (size) {
720dc7ab252bbd Huacai Chen 2022-08-25 68 case 1:
720dc7ab252bbd Huacai Chen 2022-08-25 69 case 2:
720dc7ab252bbd Huacai Chen 2022-08-25 @70 return __xchg_small(ptr, x, size);
720dc7ab252bbd Huacai Chen 2022-08-25 71
5b0b14e550a006 Huacai Chen 2022-05-31 72 case 4:
5b0b14e550a006 Huacai Chen 2022-05-31 73 return __xchg_asm("amswap_db.w", (volatile u32 *)ptr, (u32)x);
5b0b14e550a006 Huacai Chen 2022-05-31 74
5b0b14e550a006 Huacai Chen 2022-05-31 75 case 8:
5b0b14e550a006 Huacai Chen 2022-05-31 76 return __xchg_asm("amswap_db.d", (volatile u64 *)ptr, (u64)x);
5b0b14e550a006 Huacai Chen 2022-05-31 77
5b0b14e550a006 Huacai Chen 2022-05-31 78 default:
5b0b14e550a006 Huacai Chen 2022-05-31 79 BUILD_BUG();
5b0b14e550a006 Huacai Chen 2022-05-31 80 }
5b0b14e550a006 Huacai Chen 2022-05-31 81
5b0b14e550a006 Huacai Chen 2022-05-31 82 return 0;
5b0b14e550a006 Huacai Chen 2022-05-31 83 }
5b0b14e550a006 Huacai Chen 2022-05-31 84
:::::: The code at line 70 was first introduced by commit
:::::: 720dc7ab252bbdf404cab7b909e26b31e602bf7e LoongArch: Add subword xchg/cmpxchg emulation
:::::: TO: Huacai Chen <chenhuacai@loongson.cn>
:::::: CC: Huacai Chen <chenhuacai@loongson.cn>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-12-29 18:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202312300218.jKdzoA8z-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=linux-mm@kvack.org \
--cc=oe-kbuild-all@lists.linux.dev \
/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