ARM: 7689/1: add unwind annotations to ftrace asm
Add unwind annotations to the ftrace assembly code so that the function tracer's stacktracing options (func_stack_trace, etc.) work when CONFIG_ARM_UNWIND is enabled. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
6f3d90e556
commit
b21e023ba4
|
@ -276,7 +276,13 @@ ENDPROC(ftrace_graph_caller_old)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.macro mcount_enter
|
.macro mcount_enter
|
||||||
|
/*
|
||||||
|
* This pad compensates for the push {lr} at the call site. Note that we are
|
||||||
|
* unable to unwind through a function which does not otherwise save its lr.
|
||||||
|
*/
|
||||||
|
UNWIND(.pad #4)
|
||||||
stmdb sp!, {r0-r3, lr}
|
stmdb sp!, {r0-r3, lr}
|
||||||
|
UNWIND(.save {r0-r3, lr})
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
.macro mcount_get_lr reg
|
.macro mcount_get_lr reg
|
||||||
|
@ -289,6 +295,7 @@ ENDPROC(ftrace_graph_caller_old)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
ENTRY(__gnu_mcount_nc)
|
ENTRY(__gnu_mcount_nc)
|
||||||
|
UNWIND(.fnstart)
|
||||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
mov ip, lr
|
mov ip, lr
|
||||||
ldmia sp!, {lr}
|
ldmia sp!, {lr}
|
||||||
|
@ -296,17 +303,22 @@ ENTRY(__gnu_mcount_nc)
|
||||||
#else
|
#else
|
||||||
__mcount
|
__mcount
|
||||||
#endif
|
#endif
|
||||||
|
UNWIND(.fnend)
|
||||||
ENDPROC(__gnu_mcount_nc)
|
ENDPROC(__gnu_mcount_nc)
|
||||||
|
|
||||||
#ifdef CONFIG_DYNAMIC_FTRACE
|
#ifdef CONFIG_DYNAMIC_FTRACE
|
||||||
ENTRY(ftrace_caller)
|
ENTRY(ftrace_caller)
|
||||||
|
UNWIND(.fnstart)
|
||||||
__ftrace_caller
|
__ftrace_caller
|
||||||
|
UNWIND(.fnend)
|
||||||
ENDPROC(ftrace_caller)
|
ENDPROC(ftrace_caller)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
|
||||||
ENTRY(ftrace_graph_caller)
|
ENTRY(ftrace_graph_caller)
|
||||||
|
UNWIND(.fnstart)
|
||||||
__ftrace_graph_caller
|
__ftrace_graph_caller
|
||||||
|
UNWIND(.fnend)
|
||||||
ENDPROC(ftrace_graph_caller)
|
ENDPROC(ftrace_graph_caller)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue