Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d51ad7ac authored by Steven Rostedt's avatar Steven Rostedt Committed by Ingo Molnar
Browse files

ftrace: replace raw_local_irq_save with local_irq_save



Impact: fix lockdep disabling itself when function tracing is enabled

The raw_local_irq_saves used in ftrace is causing problems with
lockdep. (it thinks the irq flags are out of sync and disables
itself with a warning)

The raw ops here are not needed, and the normal local_irq_save is fine.

Signed-off-by: default avatarSteven Rostedt <srostedt@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 918c1154
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1051,7 +1051,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip)
	 * Need to use raw, since this must be called before the
	 * Need to use raw, since this must be called before the
	 * recursive protection is performed.
	 * recursive protection is performed.
	 */
	 */
	raw_local_irq_save(flags);
	local_irq_save(flags);
	cpu = raw_smp_processor_id();
	cpu = raw_smp_processor_id();
	data = tr->data[cpu];
	data = tr->data[cpu];
	disabled = atomic_inc_return(&data->disabled);
	disabled = atomic_inc_return(&data->disabled);
@@ -1062,7 +1062,7 @@ function_trace_call(unsigned long ip, unsigned long parent_ip)
	}
	}


	atomic_dec(&data->disabled);
	atomic_dec(&data->disabled);
	raw_local_irq_restore(flags);
	local_irq_restore(flags);
}
}


#ifdef CONFIG_FUNCTION_RET_TRACER
#ifdef CONFIG_FUNCTION_RET_TRACER
+2 −2
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ static int trace_test_buffer(struct trace_array *tr, unsigned long *count)
	int cpu, ret = 0;
	int cpu, ret = 0;


	/* Don't allow flipping of max traces now */
	/* Don't allow flipping of max traces now */
	raw_local_irq_save(flags);
	local_irq_save(flags);
	__raw_spin_lock(&ftrace_max_lock);
	__raw_spin_lock(&ftrace_max_lock);


	cnt = ring_buffer_entries(tr->buffer);
	cnt = ring_buffer_entries(tr->buffer);
@@ -63,7 +63,7 @@ static int trace_test_buffer(struct trace_array *tr, unsigned long *count)
			break;
			break;
	}
	}
	__raw_spin_unlock(&ftrace_max_lock);
	__raw_spin_unlock(&ftrace_max_lock);
	raw_local_irq_restore(flags);
	local_irq_restore(flags);


	if (count)
	if (count)
		*count = cnt;
		*count = cnt;