linux/arch/loongarch/lib
Tiezhu Yang cb8a2ef084 LoongArch: Add ORC stack unwinder support
The kernel CONFIG_UNWINDER_ORC option enables the ORC unwinder, which is
similar in concept to a DWARF unwinder. The difference is that the format
of the ORC data is much simpler than DWARF, which in turn allows the ORC
unwinder to be much simpler and faster.

The ORC data consists of unwind tables which are generated by objtool.
After analyzing all the code paths of a .o file, it determines information
about the stack state at each instruction address in the file and outputs
that information to the .orc_unwind and .orc_unwind_ip sections.

The per-object ORC sections are combined at link time and are sorted and
post-processed at boot time. The unwinder uses the resulting data to
correlate instruction addresses with their stack states at run time.

Most of the logic are similar with x86, in order to get ra info before ra
is saved into stack, add ra_reg and ra_offset into orc_entry. At the same
time, modify some arch-specific code to silence the objtool warnings.

Co-developed-by: Jinyang He <hejinyang@loongson.cn>
Signed-off-by: Jinyang He <hejinyang@loongson.cn>
Co-developed-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2024-03-11 22:23:47 +08:00
..
clear_user.S LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
copy_user.S LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
csum.c LoongArch: Add checksum optimization for 64-bit system 2023-05-01 17:19:43 +08:00
delay.c LoongArch: Remove useless header compiler.h 2022-07-29 18:22:32 +08:00
dump_tlb.c LoongArch: Make the CPUCFG&CSR ops simple aliases of compiler built-ins 2023-06-29 20:58:43 +08:00
error-inject.c LoongArch: Add support for function error injection 2023-05-01 17:19:52 +08:00
Makefile LoongArch: Add SIMD-optimized XOR routines 2023-09-06 22:53:55 +08:00
memcpy.S LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
memmove.S LoongArch: Add KASAN (Kernel Address Sanitizer) support 2023-09-06 22:54:16 +08:00
memset.S LoongArch: Add ORC stack unwinder support 2024-03-11 22:23:47 +08:00
unaligned.S LoongArch: Remove unneeded #include <asm/export.h> 2023-08-25 23:40:26 +08:00
xor_simd_glue.c LoongArch: Add SIMD-optimized XOR routines 2023-09-06 22:53:55 +08:00
xor_simd.c LoongArch: Add SIMD-optimized XOR routines 2023-09-06 22:53:55 +08:00
xor_simd.h LoongArch: Add SIMD-optimized XOR routines 2023-09-06 22:53:55 +08:00
xor_template.c LoongArch: Add SIMD-optimized XOR routines 2023-09-06 22:53:55 +08:00