]> 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)
commit07e6df2b822ade2931a88cbae4e0615b8d6fa713
treed49f5b01e8a2299424b31d9344101dc5b5a561d7
parent94ccdff81e8a1127f091bda149725c2c4e521f24
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