Matt Fleming 7816fecd03 sh: Mark __switch_to() as __notrace_funcgraph
Annotate __switch_to() so that the function graph tracer does not try to
trace it. Use __notrace_funcgraph, as opposed to notrace, so that other
tracers can continue to trace __switch_to().

The reason that we don't want to trace __switch_to() with the function
graph tracer is because of how the return address stack in task_struct
is implemented. When we enter __switch_to we store the real return
address on prev's ret_stack. When we return from __switch_to() we've
patched the return address on the kernel stack to be
return_to_handler. Calling return_to_handler we do,

       -> ftrace_return_to_handler()
       	  -> ftrace_pop_return_ftrace()

Which tries to pop the real return address from current->ret_stack. The
problem being that we stored the return address on prev->ret_stack, but
current now points to next, and next->ret_stack doesn't contain the
correct return address (and is possibly even empty).

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-07-11 10:08:06 +09:00
..
2009-06-23 17:30:17 +09:00
2008-12-22 18:44:04 +09:00
2009-07-11 10:08:01 +09:00
2009-01-27 14:49:10 +09:00
2009-06-16 19:47:28 -07:00
2008-10-04 05:25:52 +09:00
2009-05-09 16:02:08 +09:00
2009-06-01 15:44:49 +09:00
2009-07-11 10:08:01 +09:00
2009-03-18 18:57:43 +09:00
2009-06-11 09:08:53 +03:00
2008-12-22 18:44:44 +09:00
2008-09-13 01:44:03 +09:00
2009-03-10 12:55:40 +09:00
2009-06-18 13:38:26 +09:00
2009-05-09 16:02:08 +09:00
2009-06-17 15:39:52 +09:00