aboutsummaryrefslogtreecommitdiff
path: root/arch/loongarch/include
diff options
context:
space:
mode:
authorGravatar Jinyang He <hejinyang@loongson.cn> 2023-01-17 11:42:16 +0800
committerGravatar Huacai Chen <chenhuacai@loongson.cn> 2023-01-17 11:42:16 +0800
commitdc74a9e8a8c57966a563ab078ba91c8b2c0d0a72 (patch)
treebee8ccfdc8c2d89cc9eaf5caeab25771aef92761 /arch/loongarch/include
parentLoongArch: Strip guess unwinder out from prologue unwinder (diff)
downloadlinux-dc74a9e8a8c57966a563ab078ba91c8b2c0d0a72.tar.gz
linux-dc74a9e8a8c57966a563ab078ba91c8b2c0d0a72.tar.bz2
linux-dc74a9e8a8c57966a563ab078ba91c8b2c0d0a72.zip
LoongArch: Add generic ex-handler unwind in prologue unwinder
When exception is triggered, code flow go handle_\exception in some cases. One of stackframe in this case as follows, high -> +-------+ | REGS | <- a pt_regs | | | | <- ex trigger | REGS | <- ex pt_regs <-+ | | | | | | low -> +-------+ ->unwind-+ When unwinder unwinds to handler_\exception it cannot go on prologue analysis. Because it is an asynchronous code flow, we should get the next frame PC from regs->csr_era rather than regs->regs[1]. At init time we copy the handlers to eentry and also copy them to NUMA-affine memory named pcpu_handlers if NUMA is enabled. Thus, unwinder cannot unwind normally. To solve this, we try to give some hints in handler_\exception and fixup unwinders in unwind_next_frame(). Reported-by: Qing Zhang <zhangqing@loongson.cn> Signed-off-by: Jinyang He <hejinyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/include')
-rw-r--r--arch/loongarch/include/asm/unwind.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/include/asm/unwind.h b/arch/loongarch/include/asm/unwind.h
index 36584b95ef8b..b9dce87afd2e 100644
--- a/arch/loongarch/include/asm/unwind.h
+++ b/arch/loongarch/include/asm/unwind.h
@@ -22,7 +22,7 @@ struct unwind_state {
char type; /* UNWINDER_XXX */
struct stack_info stack_info;
struct task_struct *task;
- bool first, error, is_ftrace;
+ bool first, error, reset;
int graph_idx;
unsigned long sp, pc, ra;
};