[PATCH] ARM64: smp: Silence suspicious RCU usage with ipi tracepoints

Stephen Boyd sboyd at codeaurora.org
Wed Jun 24 13:14:18 PDT 2015

John Stultz reported an RCU splat on ARM with ipi trace events
enabled. It looks like the same problem exists on ARM64.

At this point in the IPI handling path we haven't called
irq_enter() yet, so RCU doesn't know that we're about to exit
idle and properly warns that we're using RCU from an idle CPU.
Use trace_ipi_entry_rcuidle() instead of trace_ipi_entry() so
that RCU is informed about our exit from idle.

Cc: John Stultz <john.stultz at linaro.org>
Cc: Steven Rostedt <rostedt at goodmis.org>
Cc: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
Cc: Nicolas Pitre <nicolas.pitre at linaro.org>
Fixes: 45ed695ac10a "ARM64: add IPI tracepoints"
Signed-off-by: Stephen Boyd <sboyd at codeaurora.org>

I haven't confirmed this, but it looks an awful lot like the same
problem exists on ARM64.

 arch/arm64/kernel/smp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
index 4b2121bd7f9c..a1883bfdd9d6 100644
--- a/arch/arm64/kernel/smp.c
+++ b/arch/arm64/kernel/smp.c
@@ -693,7 +693,7 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
 	struct pt_regs *old_regs = set_irq_regs(regs);
 	if ((unsigned)ipinr < NR_IPI) {
-		trace_ipi_entry(ipi_types[ipinr]);
+		trace_ipi_entry_rcuidle(ipi_types[ipinr]);
 		__inc_irq_stat(cpu, ipi_irqs[ipinr]);
@@ -736,7 +736,7 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
 	if ((unsigned)ipinr < NR_IPI)
-		trace_ipi_exit(ipi_types[ipinr]);
+		trace_ipi_exit_rcuidle(ipi_types[ipinr]);
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

More information about the linux-arm-kernel mailing list