Commit d7fc2c06 authored by Philippe Gerum's avatar Philippe Gerum

lockdep: ipipe: exclude the head stage from IRQ state tracing

parent 1d65df6c
...@@ -20,7 +20,10 @@ static DEFINE_PER_CPU(int, tracing_irq_cpu); ...@@ -20,7 +20,10 @@ static DEFINE_PER_CPU(int, tracing_irq_cpu);
void trace_hardirqs_on(void) void trace_hardirqs_on(void)
{ {
if (ipipe_root_p && this_cpu_read(tracing_irq_cpu)) { if (!ipipe_root_p)
return;
if (this_cpu_read(tracing_irq_cpu)) {
if (!in_nmi()) if (!in_nmi())
trace_irq_enable_rcuidle(CALLER_ADDR0, CALLER_ADDR1); trace_irq_enable_rcuidle(CALLER_ADDR0, CALLER_ADDR1);
tracer_hardirqs_on(CALLER_ADDR0, CALLER_ADDR1); tracer_hardirqs_on(CALLER_ADDR0, CALLER_ADDR1);
...@@ -33,7 +36,10 @@ EXPORT_SYMBOL(trace_hardirqs_on); ...@@ -33,7 +36,10 @@ EXPORT_SYMBOL(trace_hardirqs_on);
void trace_hardirqs_off(void) void trace_hardirqs_off(void)
{ {
if (ipipe_root_p && !this_cpu_read(tracing_irq_cpu)) { if (!ipipe_root_p)
return;
if (!this_cpu_read(tracing_irq_cpu)) {
this_cpu_write(tracing_irq_cpu, 1); this_cpu_write(tracing_irq_cpu, 1);
tracer_hardirqs_off(CALLER_ADDR0, CALLER_ADDR1); tracer_hardirqs_off(CALLER_ADDR0, CALLER_ADDR1);
if (!in_nmi()) if (!in_nmi())
...@@ -46,7 +52,10 @@ EXPORT_SYMBOL(trace_hardirqs_off); ...@@ -46,7 +52,10 @@ EXPORT_SYMBOL(trace_hardirqs_off);
__visible void trace_hardirqs_on_caller(unsigned long caller_addr) __visible void trace_hardirqs_on_caller(unsigned long caller_addr)
{ {
if (ipipe_root_p && this_cpu_read(tracing_irq_cpu)) { if (!ipipe_root_p)
return;
if (this_cpu_read(tracing_irq_cpu)) {
if (!in_nmi()) if (!in_nmi())
trace_irq_enable_rcuidle(CALLER_ADDR0, caller_addr); trace_irq_enable_rcuidle(CALLER_ADDR0, caller_addr);
tracer_hardirqs_on(CALLER_ADDR0, caller_addr); tracer_hardirqs_on(CALLER_ADDR0, caller_addr);
...@@ -57,7 +66,7 @@ __visible void trace_hardirqs_on_caller(unsigned long caller_addr) ...@@ -57,7 +66,7 @@ __visible void trace_hardirqs_on_caller(unsigned long caller_addr)
} }
EXPORT_SYMBOL(trace_hardirqs_on_caller); EXPORT_SYMBOL(trace_hardirqs_on_caller);
__visible void trace_hardirqs_on_virt_caller(unsigned long ip) __visible void trace_hardirqs_on_virt(void)
{ {
/* /*
* The IRQ tracing logic only applies to the root domain, and * The IRQ tracing logic only applies to the root domain, and
...@@ -65,17 +74,15 @@ __visible void trace_hardirqs_on_virt_caller(unsigned long ip) ...@@ -65,17 +74,15 @@ __visible void trace_hardirqs_on_virt_caller(unsigned long ip)
* leaving an interrupt/fault context. * leaving an interrupt/fault context.
*/ */
if (ipipe_root_p && !irqs_disabled()) if (ipipe_root_p && !irqs_disabled())
trace_hardirqs_on_caller(ip); trace_hardirqs_on_caller(CALLER_ADDR0);
}
__visible void trace_hardirqs_on_virt(void)
{
trace_hardirqs_on_virt_caller(CALLER_ADDR0);
} }
__visible void trace_hardirqs_off_caller(unsigned long caller_addr) __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
{ {
if (ipipe_root_p && !this_cpu_read(tracing_irq_cpu)) { if (!ipipe_root_p)
return;
if (!this_cpu_read(tracing_irq_cpu)) {
this_cpu_write(tracing_irq_cpu, 1); this_cpu_write(tracing_irq_cpu, 1);
tracer_hardirqs_off(CALLER_ADDR0, caller_addr); tracer_hardirqs_off(CALLER_ADDR0, caller_addr);
if (!in_nmi()) if (!in_nmi())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment