linux/arch/loongarch/mm
Jinyang He dc74a9e8a8 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>
2023-01-17 11:42:16 +08:00
..
cache.c LoongArch: Refactor cache probe and flush methods 2022-10-12 16:36:14 +08:00
extable.c LoongArch: BPF: Add BPF exception tables 2022-12-14 08:36:11 +08:00
fault.c LoongArch: mm: Avoid unnecessary page fault retires on shared memory types 2022-08-25 19:34:59 +08:00
hugetlbpage.c
init.c mm/sparse-vmemmap: generalise vmemmap_populate_hugepages() 2022-12-11 18:12:12 -08:00
ioremap.c
maccess.c
Makefile
mmap.c LoongArch: Support access filter to /dev/mem interface 2022-10-12 16:36:14 +08:00
page.S LoongArch: Re-tab the assembly files 2022-07-29 18:22:32 +08:00
pgtable.c MIPS&LoongArch&NIOS2: adjust prototypes of p?d_init() 2022-12-11 18:12:11 -08:00
tlb.c LoongArch: Add generic ex-handler unwind in prologue unwinder 2023-01-17 11:42:16 +08:00
tlbex.S LoongArch: mm: Fix huge page entry update for virtual machine 2022-12-08 14:59:15 +08:00