diff options
-rw-r--r-- | kernel/trace/trace_irqsoff.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index 421d6fe3650e..b1e4a89b08eb 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c | |||
@@ -337,12 +337,14 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller); | |||
337 | #ifdef CONFIG_PREEMPT_TRACER | 337 | #ifdef CONFIG_PREEMPT_TRACER |
338 | void trace_preempt_on(unsigned long a0, unsigned long a1) | 338 | void trace_preempt_on(unsigned long a0, unsigned long a1) |
339 | { | 339 | { |
340 | stop_critical_timing(a0, a1); | 340 | if (preempt_trace()) |
341 | stop_critical_timing(a0, a1); | ||
341 | } | 342 | } |
342 | 343 | ||
343 | void trace_preempt_off(unsigned long a0, unsigned long a1) | 344 | void trace_preempt_off(unsigned long a0, unsigned long a1) |
344 | { | 345 | { |
345 | start_critical_timing(a0, a1); | 346 | if (preempt_trace()) |
347 | start_critical_timing(a0, a1); | ||
346 | } | 348 | } |
347 | #endif /* CONFIG_PREEMPT_TRACER */ | 349 | #endif /* CONFIG_PREEMPT_TRACER */ |
348 | 350 | ||