rcu-tasks: Add Kconfig option to mediate smp_mb() vs. IPI
[linux-2.6-microblaze.git] / include / linux / rcupdate_trace.h
index c42b365..4c25a41 100644 (file)
@@ -50,7 +50,8 @@ static inline void rcu_read_lock_trace(void)
        struct task_struct *t = current;
 
        WRITE_ONCE(t->trc_reader_nesting, READ_ONCE(t->trc_reader_nesting) + 1);
-       if (t->trc_reader_special.b.need_mb)
+       if (IS_ENABLED(CONFIG_TASKS_TRACE_RCU_READ_MB) &&
+           t->trc_reader_special.b.need_mb)
                smp_mb(); // Pairs with update-side barriers
        rcu_lock_acquire(&rcu_trace_lock_map);
 }