aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Kirjanov <kda@linux-powerpc.org>2015-12-14 15:18:06 -0500
committerMichael Ellerman <mpe@ellerman.id.au>2016-02-15 05:10:03 -0500
commit126df08c52375817c237f38c3bcd01d78a60c090 (patch)
treed963e39a429eda7aa9de95e0084e6333432527a7
parentf15838e9cac8f78f0cc506529bb9d3b9fa589c1f (diff)
powerpc/pseries: Don't trace hcalls on offline CPUs
If a cpu is hotplugged while the hcall trace points are active, it's possible to hit a warning from RCU due to the trace points calling into RCU from an offline cpu, eg: RCU used illegally from offline CPU! rcu_scheduler_active = 1, debug_locks = 1 Make the hypervisor tracepoints conditional by using TRACE_EVENT_FN_COND. Acked-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Denis Kirjanov <kda@linux-powerpc.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/trace.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/include/asm/trace.h b/arch/powerpc/include/asm/trace.h
index 8e86b48d0369..32e36b16773f 100644
--- a/arch/powerpc/include/asm/trace.h
+++ b/arch/powerpc/include/asm/trace.h
@@ -57,12 +57,14 @@ DEFINE_EVENT(ppc64_interrupt_class, timer_interrupt_exit,
57extern void hcall_tracepoint_regfunc(void); 57extern void hcall_tracepoint_regfunc(void);
58extern void hcall_tracepoint_unregfunc(void); 58extern void hcall_tracepoint_unregfunc(void);
59 59
60TRACE_EVENT_FN(hcall_entry, 60TRACE_EVENT_FN_COND(hcall_entry,
61 61
62 TP_PROTO(unsigned long opcode, unsigned long *args), 62 TP_PROTO(unsigned long opcode, unsigned long *args),
63 63
64 TP_ARGS(opcode, args), 64 TP_ARGS(opcode, args),
65 65
66 TP_CONDITION(cpu_online(raw_smp_processor_id())),
67
66 TP_STRUCT__entry( 68 TP_STRUCT__entry(
67 __field(unsigned long, opcode) 69 __field(unsigned long, opcode)
68 ), 70 ),
@@ -76,13 +78,15 @@ TRACE_EVENT_FN(hcall_entry,
76 hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc 78 hcall_tracepoint_regfunc, hcall_tracepoint_unregfunc
77); 79);
78 80
79TRACE_EVENT_FN(hcall_exit, 81TRACE_EVENT_FN_COND(hcall_exit,
80 82
81 TP_PROTO(unsigned long opcode, unsigned long retval, 83 TP_PROTO(unsigned long opcode, unsigned long retval,
82 unsigned long *retbuf), 84 unsigned long *retbuf),
83 85
84 TP_ARGS(opcode, retval, retbuf), 86 TP_ARGS(opcode, retval, retbuf),
85 87
88 TP_CONDITION(cpu_online(raw_smp_processor_id())),
89
86 TP_STRUCT__entry( 90 TP_STRUCT__entry(
87 __field(unsigned long, opcode) 91 __field(unsigned long, opcode)
88 __field(unsigned long, retval) 92 __field(unsigned long, retval)