diff options
| author | Rabin Vincent <rabin@rab.in> | 2013-04-02 17:11:46 -0400 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-04-03 11:45:50 -0400 |
| commit | b21e023ba4003fe4b5c32540e4aee5991c019e92 (patch) | |
| tree | b7bf48b390beac52589302dd15a0d67050283e77 | |
| parent | 6f3d90e55660ba42301b5e9c7eed332cc9f70fd7 (diff) | |
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>
| -rw-r--r-- | arch/arm/kernel/entry-common.S | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 3248cde504ed..fefd7f971437 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
| @@ -276,7 +276,13 @@ ENDPROC(ftrace_graph_caller_old) | |||
| 276 | */ | 276 | */ |
| 277 | 277 | ||
| 278 | .macro mcount_enter | 278 | .macro mcount_enter |
| 279 | /* | ||
| 280 | * This pad compensates for the push {lr} at the call site. Note that we are | ||
| 281 | * unable to unwind through a function which does not otherwise save its lr. | ||
| 282 | */ | ||
| 283 | UNWIND(.pad #4) | ||
| 279 | stmdb sp!, {r0-r3, lr} | 284 | stmdb sp!, {r0-r3, lr} |
| 285 | UNWIND(.save {r0-r3, lr}) | ||
| 280 | .endm | 286 | .endm |
| 281 | 287 | ||
| 282 | .macro mcount_get_lr reg | 288 | .macro mcount_get_lr reg |
| @@ -289,6 +295,7 @@ ENDPROC(ftrace_graph_caller_old) | |||
| 289 | .endm | 295 | .endm |
| 290 | 296 | ||
| 291 | ENTRY(__gnu_mcount_nc) | 297 | ENTRY(__gnu_mcount_nc) |
| 298 | UNWIND(.fnstart) | ||
| 292 | #ifdef CONFIG_DYNAMIC_FTRACE | 299 | #ifdef CONFIG_DYNAMIC_FTRACE |
| 293 | mov ip, lr | 300 | mov ip, lr |
| 294 | ldmia sp!, {lr} | 301 | ldmia sp!, {lr} |
| @@ -296,17 +303,22 @@ ENTRY(__gnu_mcount_nc) | |||
| 296 | #else | 303 | #else |
| 297 | __mcount | 304 | __mcount |
| 298 | #endif | 305 | #endif |
| 306 | UNWIND(.fnend) | ||
| 299 | ENDPROC(__gnu_mcount_nc) | 307 | ENDPROC(__gnu_mcount_nc) |
| 300 | 308 | ||
| 301 | #ifdef CONFIG_DYNAMIC_FTRACE | 309 | #ifdef CONFIG_DYNAMIC_FTRACE |
| 302 | ENTRY(ftrace_caller) | 310 | ENTRY(ftrace_caller) |
| 311 | UNWIND(.fnstart) | ||
| 303 | __ftrace_caller | 312 | __ftrace_caller |
| 313 | UNWIND(.fnend) | ||
| 304 | ENDPROC(ftrace_caller) | 314 | ENDPROC(ftrace_caller) |
| 305 | #endif | 315 | #endif |
| 306 | 316 | ||
| 307 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 317 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
| 308 | ENTRY(ftrace_graph_caller) | 318 | ENTRY(ftrace_graph_caller) |
| 319 | UNWIND(.fnstart) | ||
| 309 | __ftrace_graph_caller | 320 | __ftrace_graph_caller |
| 321 | UNWIND(.fnend) | ||
| 310 | ENDPROC(ftrace_graph_caller) | 322 | ENDPROC(ftrace_graph_caller) |
| 311 | #endif | 323 | #endif |
| 312 | 324 | ||
