summaryrefslogtreecommitdiff
path: root/include/linux/spinlock.h
diff options
context:
space:
mode:
authorMarco Elver <elver@google.com>2021-11-30 14:44:22 +0300
committerPaul E. McKenney <paulmck@kernel.org>2021-12-10 03:42:27 +0300
commitf948666de517cf8ebef7cb2c9b2d669dec4bfe2e (patch)
tree2f8b8e12d5111fc08ce67245e75dee3ddb76eb3a /include/linux/spinlock.h
parent71b0e3aeb28256712945d99ca67b3f5e3ed7e0b1 (diff)
downloadlinux-f948666de517cf8ebef7cb2c9b2d669dec4bfe2e.tar.xz
locking/barriers, kcsan: Add instrumentation for barriers
Adds the required KCSAN instrumentation for barriers if CONFIG_SMP. KCSAN supports modeling the effects of: smp_mb() smp_rmb() smp_wmb() smp_store_release() Signed-off-by: Marco Elver <elver@google.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/spinlock.h')
-rw-r--r--include/linux/spinlock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index b4e5ca23f840..5c0c5174155d 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -171,7 +171,7 @@ do { \
* Architectures that can implement ACQUIRE better need to take care.
*/
#ifndef smp_mb__after_spinlock
-#define smp_mb__after_spinlock() do { } while (0)
+#define smp_mb__after_spinlock() kcsan_mb()
#endif
#ifdef CONFIG_DEBUG_SPINLOCK