]> git.baikalelectronics.ru Git - kernel.git/commit
LoongArch: Add STACKTRACE support
authorQing Zhang <zhangqing@loongson.cn>
Sat, 6 Aug 2022 08:10:04 +0000 (16:10 +0800)
committerHuacai Chen <chenhuacai@loongson.cn>
Fri, 12 Aug 2022 05:10:11 +0000 (13:10 +0800)
commitb2ed5a0e525fb5b7b33da231091124e5e56501dc
treed49f5b01e8a2299424b31d9344101dc5b5a561d7
parentbbd889cdc66a2d4a9a62382accaece1f6f135707
LoongArch: Add STACKTRACE support

1. Use common arch_stack_walk() infrastructure to avoid duplicated code
   and avoid taking care of the stack storage and filtering.
2. Add sched_ra (means sched return address) and sched_cfa (means sched
   call frame address) to thread_info, and store them in switch_to().
3. Add __get_wchan() implementation.

Now we can print the process stack and wait channel by cat /proc/*/stack
and /proc/*/wchan.

Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
arch/loongarch/Kconfig
arch/loongarch/include/asm/processor.h
arch/loongarch/include/asm/switch_to.h
arch/loongarch/kernel/Makefile
arch/loongarch/kernel/asm-offsets.c
arch/loongarch/kernel/process.c
arch/loongarch/kernel/stacktrace.c [new file with mode: 0644]
arch/loongarch/kernel/switch.S