diff options
Diffstat (limited to 'kernel/trace/trace_irqsoff.c')
| -rw-r--r-- | kernel/trace/trace_irqsoff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index 667aa8cc0cfc..20dad0d7a163 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c | |||
| @@ -23,7 +23,7 @@ static int tracer_enabled __read_mostly; | |||
| 23 | 23 | ||
| 24 | static DEFINE_PER_CPU(int, tracing_cpu); | 24 | static DEFINE_PER_CPU(int, tracing_cpu); |
| 25 | 25 | ||
| 26 | static DEFINE_SPINLOCK(max_trace_lock); | 26 | static DEFINE_RAW_SPINLOCK(max_trace_lock); |
| 27 | 27 | ||
| 28 | enum { | 28 | enum { |
| 29 | TRACER_IRQS_OFF = (1 << 1), | 29 | TRACER_IRQS_OFF = (1 << 1), |
| @@ -321,7 +321,7 @@ check_critical_timing(struct trace_array *tr, | |||
| 321 | if (!report_latency(delta)) | 321 | if (!report_latency(delta)) |
| 322 | goto out; | 322 | goto out; |
| 323 | 323 | ||
| 324 | spin_lock_irqsave(&max_trace_lock, flags); | 324 | raw_spin_lock_irqsave(&max_trace_lock, flags); |
| 325 | 325 | ||
| 326 | /* check if we are still the max latency */ | 326 | /* check if we are still the max latency */ |
| 327 | if (!report_latency(delta)) | 327 | if (!report_latency(delta)) |
| @@ -344,7 +344,7 @@ check_critical_timing(struct trace_array *tr, | |||
| 344 | max_sequence++; | 344 | max_sequence++; |
| 345 | 345 | ||
| 346 | out_unlock: | 346 | out_unlock: |
| 347 | spin_unlock_irqrestore(&max_trace_lock, flags); | 347 | raw_spin_unlock_irqrestore(&max_trace_lock, flags); |
| 348 | 348 | ||
| 349 | out: | 349 | out: |
| 350 | data->critical_sequence = max_sequence; | 350 | data->critical_sequence = max_sequence; |
| @@ -505,13 +505,13 @@ EXPORT_SYMBOL(trace_hardirqs_off_caller); | |||
| 505 | #ifdef CONFIG_PREEMPT_TRACER | 505 | #ifdef CONFIG_PREEMPT_TRACER |
| 506 | void trace_preempt_on(unsigned long a0, unsigned long a1) | 506 | void trace_preempt_on(unsigned long a0, unsigned long a1) |
| 507 | { | 507 | { |
| 508 | if (preempt_trace()) | 508 | if (preempt_trace() && !irq_trace()) |
| 509 | stop_critical_timing(a0, a1); | 509 | stop_critical_timing(a0, a1); |
| 510 | } | 510 | } |
| 511 | 511 | ||
| 512 | void trace_preempt_off(unsigned long a0, unsigned long a1) | 512 | void trace_preempt_off(unsigned long a0, unsigned long a1) |
| 513 | { | 513 | { |
| 514 | if (preempt_trace()) | 514 | if (preempt_trace() && !irq_trace()) |
| 515 | start_critical_timing(a0, a1); | 515 | start_critical_timing(a0, a1); |
| 516 | } | 516 | } |
| 517 | #endif /* CONFIG_PREEMPT_TRACER */ | 517 | #endif /* CONFIG_PREEMPT_TRACER */ |
