OSDN Git Service

ftrace/x86: Remove the complex ftrace NMI handling code
authorSteven Rostedt <srostedt@redhat.com>
Tue, 24 Apr 2012 20:31:07 +0000 (16:31 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Sat, 28 Apr 2012 01:11:28 +0000 (21:11 -0400)
commit4a6d70c9505fef1d8906b1d61db3de5d8ecf9454
tree1e0ad175481cf0156f4377e92eaaaea5acf528c6
parent08d636b6d4fb80647fe8869ea1cd97b2c26a4751
ftrace/x86: Remove the complex ftrace NMI handling code

As ftrace function tracing would require modifying code that could
be executed in NMI context, which is not stopped with stop_machine(),
ftrace had to do a complex algorithm with various stages of setup
and memory barriers to make it work.

With the new breakpoint method, this is no longer required. The changes
to the code can be done without any problem in NMI context, as well as
without stop machine altogether. Remove the complex code as it is
no longer needed.

Also, a lot of the notrace annotations could be removed from the
NMI code as it is now safe to trace them. With the exception of
do_nmi itself, which does some special work to handle running in
the debug stack. The breakpoint method can cause NMIs to double
nest the debug stack if it's not setup properly, and that is done
in do_nmi(), thus that function must not be traced.

(Note the arch sh may want to do the same)

Cc: Paul Mundt <lethal@linux-sh.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
arch/x86/Kconfig
arch/x86/kernel/ftrace.c
arch/x86/kernel/nmi.c