Patchwork [2/2] ftrace: Use local_irq_{save,restore}_nmi() in tracers.

login
register
mail settings
Submitter David Miller
Date April 7, 2010, 10:28 a.m.
Message ID <20100407.032832.150975074.davem@davemloft.net>
Download mbox | patch
Permalink /patch/49587/
State Not Applicable
Delegated to: David Miller
Headers show

Comments

David Miller - April 7, 2010, 10:28 a.m.
From: David Miller <davem@davemloft.net>
Date: Tue, 06 Apr 2010 16:40:02 -0700 (PDT)

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

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.

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

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)