OpenCloudOS-Kernel/include
Tiezhu Yang 559ae71cef LoongArch: Add ORC stack unwinder support
commit cb8a2ef0848ca80d67d6d56e2df757cfdf6b3355 upstream.

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-11-12 16:59:49 +08:00
..
acpi Merge branch '6.6.54' 2024-10-10 21:47:18 +08:00
asm-generic Merge linux 6.6.44 2024-08-05 17:22:57 +08:00
clocksource pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode. 2024-09-08 07:54:44 +02:00
crypto crypto: simd - Do not call crypto_alloc_tfm during registration 2024-10-10 11:57:26 +02:00
drm Loongarch: Dynamically enable Write Combining 2024-10-23 07:16:16 +00:00
dt-bindings dt-bindings: clock: qcom: Add GPLL9 support on gcc-sc8180x 2024-10-10 11:58:04 +02:00
keys
kunit
kvm KVM: arm64: Fix host-programmed guest events in nVHE 2024-04-10 16:35:48 +02:00
linux LoongArch: Add ORC stack unwinder support 2024-11-12 16:59:49 +08:00
math-emu
media media: cec: core: avoid recursive cec_claim_log_addrs 2024-06-12 11:12:43 +02:00
memory
misc
net Merge linux 6.6.57 2024-10-21 14:40:59 +08:00
pcmcia
ras
rdma RDMA/core: Fix umem iterator when PAGE_SIZE is greater then HCA pgsz 2023-12-13 18:45:16 +01:00
rv
scsi Merge linux 6.6.57 2024-10-21 14:40:59 +08:00
soc net: mscc: ocelot: serialize access to the injection/extraction groups 2024-08-29 17:33:45 +02:00
sound Merge linux 6.6.57 2024-10-21 14:40:59 +08:00
target
trace Merge branch '6.6.54' 2024-10-10 21:47:18 +08:00
uapi LoongArch: KVM: Add PCHPIC device support 2024-11-06 19:36:37 +08:00
ufs scsi: ufs: core: Check LSDBS cap when !mcq 2024-09-08 07:54:29 +02:00
vdso
video fbdev: stifb: Make the STI next font pointer a 32-bit signed offset 2023-11-28 17:19:58 +00:00
xen xen/events: reduce externally visible helper functions 2024-03-01 13:34:57 +01:00