public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-kernel@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>
Subject: [paulmck-rcu:frederic.2023.12.08a 29/37] fs/btrfs/transaction.c:496:6: error: call to '__compiletime_assert_329' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
Date: Sat, 9 Dec 2023 18:20:37 +0800	[thread overview]
Message-ID: <202312091837.cKaPw0Tf-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git frederic.2023.12.08a
head:   37843b5f561a08ae899fb791eeeb5abd992eabe2
commit: 7dd87072d40809e26503f04b79d63290288dbbac [29/37] btrfs: Adjust ->last_trans ordering in btrfs_record_root_in_trans()
config: riscv-rv32_defconfig (https://download.01.org/0day-ci/archive/20231209/202312091837.cKaPw0Tf-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231209/202312091837.cKaPw0Tf-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/202312091837.cKaPw0Tf-lkp@intel.com/

All errors (new ones prefixed by >>):

   warning: unknown warning option '-Wpacked-not-aligned'; did you mean '-Wpacked-non-pod'? [-Wunknown-warning-option]
   warning: unknown warning option '-Wstringop-truncation'; did you mean '-Wstring-concatenation'? [-Wunknown-warning-option]
   warning: unknown warning option '-Wmaybe-uninitialized'; did you mean '-Wuninitialized'? [-Wunknown-warning-option]
>> fs/btrfs/transaction.c:496:6: error: call to '__compiletime_assert_329' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
     496 |         if (smp_load_acquire(&root->last_trans) == trans->transid && /* ^^^ */
         |             ^
   include/asm-generic/barrier.h:176:29: note: expanded from macro 'smp_load_acquire'
     176 | #define smp_load_acquire(p) __smp_load_acquire(p)
         |                             ^
   arch/riscv/include/asm/barrier.h:42:2: note: expanded from macro '__smp_load_acquire'
      42 |         compiletime_assert_atomic_type(*p);                             \
         |         ^
   include/linux/compiler_types.h:438:2: note: expanded from macro 'compiletime_assert_atomic_type'
     438 |         compiletime_assert(__native_word(t),                            \
         |         ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert'
     423 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert'
     416 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:60:1: note: expanded from here
      60 | __compiletime_assert_329
         | ^
   fs/btrfs/transaction.c:434:3: error: call to '__compiletime_assert_326' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
     434 |                 smp_store_release(&root->last_trans, trans->transid); /* ^^^ */
         |                 ^
   include/asm-generic/barrier.h:172:55: note: expanded from macro 'smp_store_release'
     172 | #define smp_store_release(p, v) do { kcsan_release(); __smp_store_release(p, v); } while (0)
         |                                                       ^
   arch/riscv/include/asm/barrier.h:34:2: note: expanded from macro '__smp_store_release'
      34 |         compiletime_assert_atomic_type(*p);                             \
         |         ^
   include/linux/compiler_types.h:438:2: note: expanded from macro 'compiletime_assert_atomic_type'
     438 |         compiletime_assert(__native_word(t),                            \
         |         ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert'
     423 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert'
     416 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:46:1: note: expanded from here
      46 | __compiletime_assert_326
         | ^
>> fs/btrfs/transaction.c:496:6: error: call to '__compiletime_assert_329' declared with 'error' attribute: Need native word sized stores/loads for atomicity.
     496 |         if (smp_load_acquire(&root->last_trans) == trans->transid && /* ^^^ */
         |             ^
   include/asm-generic/barrier.h:176:29: note: expanded from macro 'smp_load_acquire'
     176 | #define smp_load_acquire(p) __smp_load_acquire(p)
         |                             ^
   arch/riscv/include/asm/barrier.h:42:2: note: expanded from macro '__smp_load_acquire'
      42 |         compiletime_assert_atomic_type(*p);                             \
         |         ^
   include/linux/compiler_types.h:438:2: note: expanded from macro 'compiletime_assert_atomic_type'
     438 |         compiletime_assert(__native_word(t),                            \
         |         ^
   note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
   include/linux/compiler_types.h:423:2: note: expanded from macro '_compiletime_assert'
     423 |         __compiletime_assert(condition, msg, prefix, suffix)
         |         ^
   include/linux/compiler_types.h:416:4: note: expanded from macro '__compiletime_assert'
     416 |                         prefix ## suffix();                             \
         |                         ^
   <scratch space>:60:1: note: expanded from here
      60 | __compiletime_assert_329
         | ^
   3 warnings and 3 errors generated.


vim +496 fs/btrfs/transaction.c

   481	
   482	int btrfs_record_root_in_trans(struct btrfs_trans_handle *trans,
   483				       struct btrfs_root *root)
   484	{
   485		struct btrfs_fs_info *fs_info = root->fs_info;
   486		int ret;
   487	
   488		if (!test_bit(BTRFS_ROOT_SHAREABLE, &root->state))
   489			return 0;
   490	
   491		/*
   492		 * see record_root_in_trans for comments about IN_TRANS_SETUP usage
   493		 * and barriers.  The smp_load_acquire() pairs with the smp_wmb()
   494		 * and the test_bit_acquire pairs with the smp_mb__before_atomic().
   495		 */
 > 496		if (smp_load_acquire(&root->last_trans) == trans->transid && /* ^^^ */
   497		    !test_bit_acquire(BTRFS_ROOT_IN_TRANS_SETUP, &root->state)) /* ^^^ */
   498			return 0;
   499	
   500		mutex_lock(&fs_info->reloc_mutex);
   501		ret = record_root_in_trans(trans, root, 0);
   502		mutex_unlock(&fs_info->reloc_mutex);
   503	
   504		return ret;
   505	}
   506	

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

             reply	other threads:[~2023-12-09 10:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-09 10:20 kernel test robot [this message]
2023-12-09 15:51 ` [paulmck-rcu:frederic.2023.12.08a 29/37] fs/btrfs/transaction.c:496:6: error: call to '__compiletime_assert_329' declared with 'error' attribute: Need native word sized stores/loads for atomicity Paul E. McKenney
2023-12-13 12:53   ` David Sterba
2023-12-13 14:56     ` Paul E. McKenney
2023-12-13 15:54       ` Josef Bacik
2023-12-13 18:05         ` Paul E. McKenney
2023-12-13 19:53           ` Josef Bacik
2023-12-13 20:15             ` Paul E. McKenney

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=202312091837.cKaPw0Tf-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=paulmck@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