diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-11-18 14:57:33 +1100 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-11-18 14:57:33 +1100 |
commit | 8f41f30053e2b1431703f3c7e19dc8bf7107b19a (patch) | |
tree | 1e8112eb729e10bf96bb713029d2c3e7e0af7436 /asm | |
parent | 20410452b956edaf7790803d441768fbf707b36c (diff) | |
download | skiboot-8f41f30053e2b1431703f3c7e19dc8bf7107b19a.zip skiboot-8f41f30053e2b1431703f3c7e19dc8bf7107b19a.tar.gz skiboot-8f41f30053e2b1431703f3c7e19dc8bf7107b19a.tar.bz2 |
Capture backtraces when measuring stack depth
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'asm')
-rw-r--r-- | asm/asm-offsets.c | 3 | ||||
-rw-r--r-- | asm/head.S | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/asm/asm-offsets.c b/asm/asm-offsets.c index 4fb2344..74f3124 100644 --- a/asm/asm-offsets.c +++ b/asm/asm-offsets.c @@ -37,10 +37,11 @@ int main(void) OFFSET(CPUTHREAD_STATE, cpu_thread, state); OFFSET(CPUTHREAD_CUR_TOKEN, cpu_thread, current_token); DEFINE(CPUTHREAD_GAP, sizeof(struct cpu_thread) + STACK_SAFETY_GAP); +#ifdef STACK_CHECK_ENABLED OFFSET(CPUTHREAD_STACK_BOT_MARK, cpu_thread, stack_bot_mark); OFFSET(CPUTHREAD_STACK_BOT_PC, cpu_thread, stack_bot_pc); OFFSET(CPUTHREAD_STACK_BOT_TOK, cpu_thread, stack_bot_tok); - +#endif OFFSET(STACK_TYPE, stack_frame, type); OFFSET(STACK_LOCALS, stack_frame, locals); OFFSET(STACK_GPR0, stack_frame, gpr[0]); @@ -311,10 +311,11 @@ boot_entry: /* Get our per-cpu pointer into r13 */ GET_CPU() +#ifdef STACK_CHECK_ENABLED /* Initialize stack bottom mark to 0, it will be updated in C code */ li %r0,0 std %r0,CPUTHREAD_STACK_BOT_MARK(%r13) - +#endif /* Jump to C */ mr %r3,%r27 mr %r4,%r25 |