Merge tag 'omap-for-v4.6/dt-ti81xx-signed' of git://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / kernel / trace / trace_irqsoff.c
index e4e5658..03cdff8 100644 (file)
@@ -109,8 +109,12 @@ static int func_prolog_dec(struct trace_array *tr,
                return 0;
 
        local_save_flags(*flags);
-       /* slight chance to get a false positive on tracing_cpu */
-       if (!irqs_disabled_flags(*flags))
+       /*
+        * Slight chance to get a false positive on tracing_cpu,
+        * although I'm starting to think there isn't a chance.
+        * Leave this for now just to be paranoid.
+        */
+       if (!irqs_disabled_flags(*flags) && !preempt_count())
                return 0;
 
        *data = per_cpu_ptr(tr->trace_buffer.data, cpu);
@@ -622,7 +626,6 @@ static int __irqsoff_tracer_init(struct trace_array *tr)
        irqsoff_trace = tr;
        /* make sure that the tracer is visible */
        smp_wmb();
-       tracing_reset_online_cpus(&tr->trace_buffer);
 
        ftrace_init_array_ops(tr, irqsoff_tracer_call);