Skip to content

Commit be081d9

Browse files
bebarinoctmarinas
authored andcommitted
ARM64: smp: Fix suspicious RCU usage with ipi tracepoints
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 <[email protected]> Cc: Nicolas Pitre <[email protected]> Acked-by: Steven Rostedt <[email protected]> Reviewed-by: Paul E. McKenney <[email protected]> Cc: <[email protected]> # 3.17+ Fixes: 45ed695 ("ARM64: add IPI tracepoints") Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 86dca36 commit be081d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
693693
struct pt_regs *old_regs = set_irq_regs(regs);
694694

695695
if ((unsigned)ipinr < NR_IPI) {
696-
trace_ipi_entry(ipi_types[ipinr]);
696+
trace_ipi_entry_rcuidle(ipi_types[ipinr]);
697697
__inc_irq_stat(cpu, ipi_irqs[ipinr]);
698698
}
699699

@@ -736,7 +736,7 @@ void handle_IPI(int ipinr, struct pt_regs *regs)
736736
}
737737

738738
if ((unsigned)ipinr < NR_IPI)
739-
trace_ipi_exit(ipi_types[ipinr]);
739+
trace_ipi_exit_rcuidle(ipi_types[ipinr]);
740740
set_irq_regs(old_regs);
741741
}
742742

0 commit comments

Comments
 (0)