OSDN Git Service

rcu: Make RCU IRQ enter/exit functions rely on in_nmi()
authorPaul E. McKenney <paulmck@kernel.org>
Thu, 13 Feb 2020 20:31:16 +0000 (12:31 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 19 May 2020 13:51:21 +0000 (15:51 +0200)
commit9ea366f669ded353ae49754216c042e7d2f72ba6
treec0e981ec6058e7e93c116064e1dc7e34c235840a
parentff5c4f5cad33061b07c3fb9187506783c0f3cb66
rcu: Make RCU IRQ enter/exit functions rely on in_nmi()

The rcu_nmi_enter_common() and rcu_nmi_exit_common() functions take an
"irq" parameter that indicates whether these functions have been invoked from
an irq handler (irq==true) or an NMI handler (irq==false).

However, recent changes have applied notrace to a few critical functions
such that rcu_nmi_enter_common() and rcu_nmi_exit_common() many now rely on
in_nmi().  Note that in_nmi() works no differently than before, but rather
that tracing is now prohibited in code regions where in_nmi() would
incorrectly report NMI state.

Therefore remove the "irq" parameter and inline rcu_nmi_enter_common() and
rcu_nmi_exit_common() into rcu_nmi_enter() and rcu_nmi_exit(),
respectively.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Link: https://lkml.kernel.org/r/20200505134101.617130349@linutronix.de
kernel/rcu/tree.c