Re: [PATCH 2/2] ftrace: Use local_irq_{save,restore}_nmi() intracers.

From: David Miller
Date: Wed Apr 07 2010 - 06:28:38 EST


From: David Miller <davem@xxxxxxxxxxxxx>
Date: Tue, 06 Apr 2010 16:40:02 -0700 (PDT)

>
> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>

Peter, I found one more file that needs this annotation while
implementing function graph tracing support on sparc64.

Please add this to the original patch when you queue it up, thanks.

diff --git a/kernel/trace/trace_functions_graph.c b/kernel/trace/trace_functions_graph.c
index e6989d9..67fbdf1 100644
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -220,7 +220,7 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
if (!(trace->depth || ftrace_graph_addr(trace->func)))
return 0;

- local_irq_save(flags);
+ local_irq_save_nmi(flags);
cpu = raw_smp_processor_id();
data = tr->data[cpu];
disabled = atomic_inc_return(&data->disabled);
@@ -232,7 +232,7 @@ int trace_graph_entry(struct ftrace_graph_ent *trace)
}

atomic_dec(&data->disabled);
- local_irq_restore(flags);
+ local_irq_restore_nmi(flags);

return ret;
}
@@ -277,7 +277,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace)
int cpu;
int pc;

- local_irq_save(flags);
+ local_irq_save_nmi(flags);
cpu = raw_smp_processor_id();
data = tr->data[cpu];
disabled = atomic_inc_return(&data->disabled);
@@ -286,7 +286,7 @@ void trace_graph_return(struct ftrace_graph_ret *trace)
__trace_graph_return(tr, trace, flags, pc);
}
atomic_dec(&data->disabled);
- local_irq_restore(flags);
+ local_irq_restore_nmi(flags);
}

void set_graph_array(struct trace_array *tr)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/