aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/asm-generic
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2024-01-24 22:28:57 +0800
committerChristian Brauner <brauner@kernel.org>2024-01-25 17:23:51 +0100
commitad72872eb3ae634d1e4296a384baa81e85cc6acc (patch)
treedcc6b23b8d07fd6527cc2a587459780a3e6d778c /include/asm-generic
parentRevert "mm/filemap: avoid buffered read/write race to read inconsistent data" (diff)
downloadwireguard-linux-ad72872eb3ae634d1e4296a384baa81e85cc6acc.tar.xz
wireguard-linux-ad72872eb3ae634d1e4296a384baa81e85cc6acc.zip
asm-generic: remove extra type checking in acquire/release for non-SMP case
If CONFIG_SMP is not enabled, the smp_load_acquire/smp_store_release is implemented as READ_ONCE/READ_ONCE and barrier() and type checking. READ_ONCE/READ_ONCE already checks the pointer type, and then checks it more stringently outside, but the non-SMP case simply isn't relevant, so remove the extra compiletime_assert_atomic_type() to avoid compilation errors. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202401230837.TXro0PHi-lkp@intel.com/ Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Baokun Li <libaokun1@huawei.com> Link: https://lore.kernel.org/r/20240124142857.4146716-4-libaokun1@huawei.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/barrier.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/asm-generic/barrier.h b/include/asm-generic/barrier.h
index 961f4d88f9ef..0c0695763bea 100644
--- a/include/asm-generic/barrier.h
+++ b/include/asm-generic/barrier.h
@@ -193,7 +193,6 @@ do { \
#ifndef smp_store_release
#define smp_store_release(p, v) \
do { \
- compiletime_assert_atomic_type(*p); \
barrier(); \
WRITE_ONCE(*p, v); \
} while (0)
@@ -203,7 +202,6 @@ do { \
#define smp_load_acquire(p) \
({ \
__unqual_scalar_typeof(*p) ___p1 = READ_ONCE(*p); \
- compiletime_assert_atomic_type(*p); \
barrier(); \
(typeof(*p))___p1; \
})