diff options
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r-- | kernel/trace/trace.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 91887a280ab9..8b6409a62b54 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -1200,7 +1200,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip) | |||
1200 | } | 1200 | } |
1201 | 1201 | ||
1202 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 1202 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
1203 | void trace_graph_entry(struct ftrace_graph_ent *trace) | 1203 | int trace_graph_entry(struct ftrace_graph_ent *trace) |
1204 | { | 1204 | { |
1205 | struct trace_array *tr = &global_trace; | 1205 | struct trace_array *tr = &global_trace; |
1206 | struct trace_array_cpu *data; | 1206 | struct trace_array_cpu *data; |
@@ -1209,7 +1209,7 @@ void trace_graph_entry(struct ftrace_graph_ent *trace) | |||
1209 | int cpu; | 1209 | int cpu; |
1210 | int pc; | 1210 | int pc; |
1211 | 1211 | ||
1212 | raw_local_irq_save(flags); | 1212 | local_irq_save(flags); |
1213 | cpu = raw_smp_processor_id(); | 1213 | cpu = raw_smp_processor_id(); |
1214 | data = tr->data[cpu]; | 1214 | data = tr->data[cpu]; |
1215 | disabled = atomic_inc_return(&data->disabled); | 1215 | disabled = atomic_inc_return(&data->disabled); |
@@ -1218,7 +1218,9 @@ void trace_graph_entry(struct ftrace_graph_ent *trace) | |||
1218 | __trace_graph_entry(tr, data, trace, flags, pc); | 1218 | __trace_graph_entry(tr, data, trace, flags, pc); |
1219 | } | 1219 | } |
1220 | atomic_dec(&data->disabled); | 1220 | atomic_dec(&data->disabled); |
1221 | raw_local_irq_restore(flags); | 1221 | local_irq_restore(flags); |
1222 | |||
1223 | return 1; | ||
1222 | } | 1224 | } |
1223 | 1225 | ||
1224 | void trace_graph_return(struct ftrace_graph_ret *trace) | 1226 | void trace_graph_return(struct ftrace_graph_ret *trace) |
@@ -1230,7 +1232,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace) | |||
1230 | int cpu; | 1232 | int cpu; |
1231 | int pc; | 1233 | int pc; |
1232 | 1234 | ||
1233 | raw_local_irq_save(flags); | 1235 | local_irq_save(flags); |
1234 | cpu = raw_smp_processor_id(); | 1236 | cpu = raw_smp_processor_id(); |
1235 | data = tr->data[cpu]; | 1237 | data = tr->data[cpu]; |
1236 | disabled = atomic_inc_return(&data->disabled); | 1238 | disabled = atomic_inc_return(&data->disabled); |
@@ -1239,7 +1241,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace) | |||
1239 | __trace_graph_return(tr, data, trace, flags, pc); | 1241 | __trace_graph_return(tr, data, trace, flags, pc); |
1240 | } | 1242 | } |
1241 | atomic_dec(&data->disabled); | 1243 | atomic_dec(&data->disabled); |
1242 | raw_local_irq_restore(flags); | 1244 | local_irq_restore(flags); |
1243 | } | 1245 | } |
1244 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ | 1246 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ |
1245 | 1247 | ||
@@ -2645,7 +2647,7 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf, | |||
2645 | if (err) | 2647 | if (err) |
2646 | goto err_unlock; | 2648 | goto err_unlock; |
2647 | 2649 | ||
2648 | raw_local_irq_disable(); | 2650 | local_irq_disable(); |
2649 | __raw_spin_lock(&ftrace_max_lock); | 2651 | __raw_spin_lock(&ftrace_max_lock); |
2650 | for_each_tracing_cpu(cpu) { | 2652 | for_each_tracing_cpu(cpu) { |
2651 | /* | 2653 | /* |
@@ -2662,7 +2664,7 @@ tracing_cpumask_write(struct file *filp, const char __user *ubuf, | |||
2662 | } | 2664 | } |
2663 | } | 2665 | } |
2664 | __raw_spin_unlock(&ftrace_max_lock); | 2666 | __raw_spin_unlock(&ftrace_max_lock); |
2665 | raw_local_irq_enable(); | 2667 | local_irq_enable(); |
2666 | 2668 | ||
2667 | tracing_cpumask = tracing_cpumask_new; | 2669 | tracing_cpumask = tracing_cpumask_new; |
2668 | 2670 | ||