]> git.karo-electronics.de Git - karo-tx-linux.git/commit
trace: Allow idle-safe tracepoints to be called from irq
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 22 May 2013 09:41:36 +0000 (02:41 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 3 Jun 2013 03:36:08 +0000 (20:36 -0700)
commit097de9f48860ae2d4c54d0810b1369affa06de61
tree8287f5af835de26a2e728fe5b0237b2ef1edb75e
parentc7788792a5e7b0d5d7f96d0766b4cb6112d47d75
trace: Allow idle-safe tracepoints to be called from irq

__DECLARE_TRACE_RCU() currently creates an _rcuidle() tracepoint which
may safely be invoked from what RCU considers to be an idle CPU.
However, these _rcuidle() tracepoints may -not- be invoked from the
handler of an irq taken from idle, because rcu_idle_enter() zeroes
RCU's nesting-level counter, so that the rcu_irq_exit() returning to
idle will trigger a WARN_ON_ONCE().

This commit therefore substitutes rcu_irq_enter() for rcu_idle_exit()
and rcu_irq_exit() for rcu_idle_enter() in order to make the _rcuidle()
tracepoints usable from irq handlers as well as from process context.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
include/linux/tracepoint.h