mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
arm64: traps: save cpu regs to minidump when cpus die
If two cpu die at the same time, the first cpu get die_lock, calls minidump die notify and saves regs, then panics. But the second cpu would hardlock because it can't get the die_lock. And nothing is saved to minidump, so we have the patch. Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com> Change-Id: I38cda3a6cee160ba1293a2e18c7238c96cf2e755
This commit is contained in:
@@ -48,6 +48,10 @@
|
||||
|
||||
#include <trace/hooks/traps.h>
|
||||
|
||||
#if IS_ENABLED(CONFIG_ROCKCHIP_MINIDUMP)
|
||||
#include <soc/rockchip/rk_minidump.h>
|
||||
#endif
|
||||
|
||||
static const char *handler[]= {
|
||||
"Synchronous Abort",
|
||||
"IRQ",
|
||||
@@ -123,6 +127,9 @@ void die(const char *str, struct pt_regs *regs, int err)
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
|
||||
#if IS_ENABLED(CONFIG_ROCKCHIP_MINIDUMP)
|
||||
rk_minidump_update_cpu_regs(regs);
|
||||
#endif
|
||||
raw_spin_lock_irqsave(&die_lock, flags);
|
||||
|
||||
oops_enter();
|
||||
|
||||
Reference in New Issue
Block a user