diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-05-03 21:28:59 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-06-09 03:52:32 +0200 |
commit | b8989b76052eedc99b09322efd6f68816f191a1a (patch) | |
tree | 0f31be2cadab883f337ce9468aa69d1ba8dfdc36 /kernel/rcu/rcu.h | |
parent | rcu: Move rcu_is_nocb_cpu() from rcupdate.h to rcu.h (diff) | |
download | linux-b8989b76052eedc99b09322efd6f68816f191a1a.tar.xz linux-b8989b76052eedc99b09322efd6f68816f191a1a.zip |
rcu: Move rcu_ftrace_dump() from rcupdate.h to rcu.h
The rcu_ftrace_dump() function is used only internally to RCU. This
commit therefore moves its declaration from include/linux/rcupdate.h
to kernel/rcu/rcu.h.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to '')
-rw-r--r-- | kernel/rcu/rcu.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h index 2f344662c568..cdbaa441bdac 100644 --- a/kernel/rcu/rcu.h +++ b/kernel/rcu/rcu.h @@ -212,6 +212,18 @@ int rcu_jiffies_till_stall_check(void); */ #define TPS(x) tracepoint_string(x) +/* + * Dump the ftrace buffer, but only one time per callsite per boot. + */ +#define rcu_ftrace_dump(oops_dump_mode) \ +do { \ + static atomic_t ___rfd_beenhere = ATOMIC_INIT(0); \ + \ + if (!atomic_read(&___rfd_beenhere) && \ + !atomic_xchg(&___rfd_beenhere, 1)) \ + ftrace_dump(oops_dump_mode); \ +} while (0) + void rcu_early_boot_tests(void); void rcu_test_sync_prims(void); |