Skip to content

Commit 8951eb1

Browse files
committed
xtensa: make stack dump size configurable
Introduce Kconfig symbol PRINT_STACK_DEPTH and use it to initialize kstack_depth_to_print. Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Max Filippov <[email protected]>
1 parent c5fcceb commit 8951eb1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

arch/xtensa/Kconfig.debug

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@ config S32C1I_SELFTEST
3131
It is easy to make wrong hardware configuration, this test should catch it early.
3232

3333
Say 'N' on stable hardware.
34+
35+
config PRINT_STACK_DEPTH
36+
int "Stack depth to print" if DEBUG_KERNEL
37+
default 64
38+
help
39+
This option allows you to set the stack depth that the kernel
40+
prints in stack traces.

arch/xtensa/kernel/traps.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ void show_trace(struct task_struct *task, unsigned long *sp)
495495

496496
#define STACK_DUMP_ENTRY_SIZE 4
497497
#define STACK_DUMP_LINE_SIZE 32
498-
static size_t kstack_depth_to_print = 24;
498+
static size_t kstack_depth_to_print = CONFIG_PRINT_STACK_DEPTH;
499499

500500
void show_stack(struct task_struct *task, unsigned long *sp)
501501
{

0 commit comments

Comments
 (0)